| | |
| | | @PostMapping("addLine") |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Result<?> addLine(@RequestBody Equipment equipment){ |
| | | equipment.setIsLineEquip("no"); |
| | | equipmentService.save(equipment); |
| | | List<Equipment> equipmentList = equipment.getEquipmentOfLineTable(); |
| | | for(Equipment equipment1:equipmentList){ |
| | | equipment1.setId(equipment1.getShowId()); |
| | | equipment1.setIsLineEquip("yes"); |
| | | equipment1.setLineId(equipment.getId()); |
| | | } |
| | | equipmentService.updateBatchById(equipmentList); |
| | |
| | | List<Equipment> equipmentList = equipment.getEquipmentOfLineTable(); |
| | | for(Equipment equipment1:equipmentList){ |
| | | equipment1.setLineId(equipment.getId()); |
| | | String id = equipment1.getId(); |
| | | if(StringUtils.isBlank(id)){ |
| | | equipment1.setId(equipment1.getShowId()); |
| | | } |
| | | equipment1.setIsLineEquip("yes"); |
| | | } |
| | | equipmentService.updateBatchById(equipmentList); |
| | | return Result.OK("编辑成功"); |
| | |
| | | |
| | | // 将合并后的long值转换为16进制字符串 |
| | | String hexString = Long.toHexString(combinedBits); |
| | | String planNum = sysIdentityService.getNumByTypeAndLength("",4); |
| | | String planNum = sysIdentityService.getNumByTypeAndLength("MaintenancePlan",4); |
| | | plan.setId(hexString); |
| | | plan.setNum(planNum); |
| | | plan.setType("3"); |
| | |
| | | @Param("warrantyStart")Date warrantyStart, |
| | | @Param("warrantyEnd")Date warrantyEnd, |
| | | @Param("lineId")String lineId, |
| | | @Param("isLineEquip")String isLineEquip, |
| | | @Param("sql")String sql |
| | | ); |
| | | List<DailyInspectionStandardDetail> getStandardList(Page<DailyInspectionStandardDetail> page,@Param("mainId") String mainId,@Param("type")String type); |
| | |
| | | t1.line_id lineId, |
| | | t1.is_meta isMeta, |
| | | t1.id showId, |
| | | t1.is_line_equip isLineEquip, |
| | | t1.is_judging isJudging, |
| | | t3.sumOfEquipment |
| | | from mom_eam_equipment t1 |
| | | left join (select * from mom_eam_equipment_category where del_flag = 0) t2 on t1.equipment_category_id = t2.id |
| | |
| | | <if test="equipmentStatus != null and equipmentStatus != ''"> |
| | | and t1.equipment_status = #{equipmentStatus} |
| | | </if> |
| | | <if test="isLineEquip != null and isLineEquip != ''"> |
| | | and t1.is_line_equip = #{isLineEquip} |
| | | </if> |
| | | <if test="specificEquipment != null and specificEquipment != ''"> |
| | | and t1.specific_equipment = #{specificEquipment} |
| | | </if> |
| | |
| | | equipment.getWarrantyStart(), |
| | | equipment.getWarrantyEnd(), |
| | | equipment.getLineId(), |
| | | equipment.getIsLineEquip(), |
| | | sql |
| | | )); |
| | | } |
| | |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'mom_eam_equipment_maintenance_plan', |
| | | 'COLUMN', N'create_reason' |
| | | -- 设备台账增加两个字段 |
| | | ALTER TABLE [dbo].[mom_eam_equipment] ADD [is_line_equip] nvarchar(32) NULL |
| | | GO |
| | | |
| | | ALTER TABLE [dbo].[mom_eam_equipment] ADD [is_judging] nvarchar(32) NULL |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'是否生产线设备(是:yes,否:no)', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'mom_eam_equipment', |
| | | 'COLUMN', N'is_line_equip' |
| | | GO |
| | | |
| | | EXEC sp_addextendedproperty |
| | | 'MS_Description', N'是否在评分当中(是:yes,否:no)', |
| | | 'SCHEMA', N'dbo', |
| | | 'TABLE', N'mom_eam_equipment', |
| | | 'COLUMN', N'is_judging' |