| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.pp.BasicDataProduce; |
| | | import com.example.erp.entity.pp.DeviceMaintenance; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.example.erp.mapper.pp.DeviceMaintenanceMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public Map<String, Object> selectMaintenanceSv(Date selectTime1, Date selectTime2) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", deviceMaintenanceMapper.selectMaintenanceMp(selectTime1,selectTime2)); |
| | | map.put("process", deviceMaintenanceMapper.selectProcessMp()); |
| | | return map; |
| | | } |
| | | |
| | |
| | | map.put("data", deviceMaintenanceMapper.openSelectIdMp(id)); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean updateMaintenance(Map<String, Object> object) { |
| | | JSONObject dataJson = new JSONObject(object); |
| | | DeviceMaintenance deviceMaintenance = JSONObject.parseObject(JSONObject.toJSONString(dataJson.get("machine")), DeviceMaintenance.class); |
| | | if (!dataJson.isEmpty()) { |
| | | deviceMaintenanceMapper.updateMaintenanceMp(deviceMaintenance.getId(),deviceMaintenance.getDeviceName(), |
| | | deviceMaintenance.getType(),deviceMaintenance.getFaultTime(),deviceMaintenance.getFaultReason(), |
| | | deviceMaintenance.getMaintenanceTime(),deviceMaintenance.getMaintenanceIllustrate(), |
| | | deviceMaintenance.getStopTime(),deviceMaintenance.getStartTime(),deviceMaintenance.getProcess(), |
| | | deviceMaintenance.getPersonnel(), |
| | | deviceMaintenance.getCost() |
| | | ); |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | } |