diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesAttendanceRecordsController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesAttendanceRecordsController.java new file mode 100644 index 00000000..b11a90c9 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesAttendanceRecordsController.java @@ -0,0 +1,98 @@ +package com.op.mes.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.op.common.core.web.controller.BaseController; +import com.op.common.core.web.page.TableDataInfo; +import com.op.common.security.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.op.mes.domain.MesAttendanceRecords; +import com.op.mes.service.IMesAttendanceRecordsService; + + +/** + * MES打卡记录Controller + * + * @author Yangwl + * @date 2025-02-19 + */ +@RestController +@RequestMapping("/AttendanceRecords") +public class MesAttendanceRecordsController extends BaseController +{ + @Autowired + private IMesAttendanceRecordsService mesAttendanceRecordsService; + + /** + * 查询MES打卡记录列表 + */ + @RequiresPermissions("mes:AttendanceRecords:list") + @GetMapping("/list") + public TableDataInfo list(MesAttendanceRecords mesAttendanceRecords) + { + startPage(); + List list = mesAttendanceRecordsService.selectMesAttendanceRecordsList(mesAttendanceRecords); + return getDataTable(list); + } + +// /** +// * 导出MES打卡记录列表 +// */ +// @PreAuthorize("@ss.hasPermi('mes:AttendanceRecords:export')") +// @Log(title = "MES打卡记录", businessType = BusinessType.EXPORT) +// @PostMapping("/export") +// public void export(HttpServletResponse response, MesAttendanceRecords mesAttendanceRecords) +// { +// List list = mesAttendanceRecordsService.selectMesAttendanceRecordsList(mesAttendanceRecords); +// ExcelUtil util = new ExcelUtil(MesAttendanceRecords.class); +// util.exportExcel(response, list, "MES打卡记录数据"); +// } + +// /** +// * 获取MES打卡记录详细信息 +// */ +// @PreAuthorize("@ss.hasPermi('mes:AttendanceRecords:query')") +// @GetMapping(value = "/{id}") +// public AjaxResult getInfo(@PathVariable("id") String id) +// { +// return success(mesAttendanceRecordsService.selectMesAttendanceRecordsById(id)); +// } +// +// /** +// * 新增MES打卡记录 +// */ +// @PreAuthorize("@ss.hasPermi('mes:AttendanceRecords:add')") +// @Log(title = "MES打卡记录", businessType = BusinessType.INSERT) +// @PostMapping +// public AjaxResult add(@RequestBody MesAttendanceRecords mesAttendanceRecords) +// { +// return toAjax(mesAttendanceRecordsService.insertMesAttendanceRecords(mesAttendanceRecords)); +// } +// +// /** +// * 修改MES打卡记录 +// */ +// @PreAuthorize("@ss.hasPermi('mes:AttendanceRecords:edit')") +// @Log(title = "MES打卡记录", businessType = BusinessType.UPDATE) +// @PutMapping +// public AjaxResult edit(@RequestBody MesAttendanceRecords mesAttendanceRecords) +// { +// return toAjax(mesAttendanceRecordsService.updateMesAttendanceRecords(mesAttendanceRecords)); +// } +// +// /** +// * 删除MES打卡记录 +// */ +// @PreAuthorize("@ss.hasPermi('mes:AttendanceRecords:remove')") +// @Log(title = "MES打卡记录", businessType = BusinessType.DELETE) +// @DeleteMapping("/{ids}") +// public AjaxResult remove(@PathVariable String[] ids) +// { +// return toAjax(mesAttendanceRecordsService.deleteMesAttendanceRecordsByIds(ids)); +// } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorksController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorksController.java index e036b21e..67c7120c 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorksController.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorksController.java @@ -39,11 +39,11 @@ public class MesReportWorksController extends BaseController { */ @RequiresPermissions("mes:reportWork:lists") @GetMapping("/lists") - public TableDataInfo lists(MesReportWork mesReportWork) { -// startPage(); -// List hzlist = mesReportWorksService.getReportWorksList(mesReportWork); -// return getDataTable(hzlist); - return null; + public TableDataInfo lists(ConsumptionDiff consumptionDiff) { + startPage(); + List hzlist = mesReportWorksService.getReportWorksList(consumptionDiff); + return getDataTable(hzlist); + } /** diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/ConsumptionDiff.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/ConsumptionDiff.java new file mode 100644 index 00000000..457b0a20 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/ConsumptionDiff.java @@ -0,0 +1,200 @@ +package com.op.mes.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +public class ConsumptionDiff extends BaseEntity { + private String parentOrder; + private String workorderCodeSap; + private String workorderCode; + private String productCode; + private String productName; + private String unit; + private String atrr2; + @Excel(name = "工单日期",dateFormat = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date productDate;//工单日期 + private BigDecimal planNumber; + private BigDecimal proNumber; + private String materialCode; + private String materialName; + private BigDecimal quantity; + private String recoil; + private BigDecimal standar; + private String erfme; + private BigDecimal diff; + private BigDecimal orderQuantity; + private BigDecimal quantityFeedback; + private BigDecimal should; + + + public BigDecimal getShould() { + return should; + } + + public void setShould(BigDecimal should) { + this.should = should; + } + + public BigDecimal getOrderQuantity() { + return orderQuantity; + } + + public void setOrderQuantity(BigDecimal orderQuantity) { + this.orderQuantity = orderQuantity; + } + + public BigDecimal getQuantityFeedback() { + return quantityFeedback; + } + + public void setQuantityFeedback(BigDecimal quantityFeedback) { + this.quantityFeedback = quantityFeedback; + } + + public Date getProductDate() { + return productDate; + } + + public void setProductDate(Date productDate) { + this.productDate = productDate; + } + + public BigDecimal getDiff() { + if (should != null && quantity != null) { + this.diff = quantity.subtract(should).setScale(2, BigDecimal.ROUND_HALF_UP); + } else { + this.diff = null; // 或者根据需求处理 + } + return diff; + } + + public void setDiff(BigDecimal diff) { + this.diff = diff; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public String getParentOrder() { + return parentOrder; + } + + public void setParentOrder(String parentOrder) { + this.parentOrder = parentOrder; + } + + public String getProductCode() { + return productCode; + } + + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getAtrr2() { + return atrr2; + } + + public void setAtrr2(String atrr2) { + this.atrr2 = atrr2; + } + + public BigDecimal getPlanNumber() { + return planNumber; + } + + public void setPlanNumber(BigDecimal planNumber) { + this.planNumber = planNumber; + } + + public BigDecimal getProNumber() { + return proNumber; + } + + public void setProNumber(BigDecimal proNumber) { + this.proNumber = proNumber; + } + + public String getWorkorderCodeSap() { + return workorderCodeSap; + } + + public void setWorkorderCodeSap(String workorderCodeSap) { + this.workorderCodeSap = workorderCodeSap; + } + + public String getWorkorderCode() { + return workorderCode; + } + + public void setWorkorderCode(String workorderCode) { + this.workorderCode = workorderCode; + } + + public String getMaterialCode() { + return materialCode; + } + + public void setMaterialCode(String materialCode) { + this.materialCode = materialCode; + } + + public String getMaterialName() { + return materialName; + } + + public void setMaterialName(String materialName) { + this.materialName = materialName; + } + + public BigDecimal getQuantity() { + return quantity; + } + + public void setQuantity(BigDecimal quantity) { + this.quantity = quantity; + } + + public String getRecoil() { + return recoil; + } + + public void setRecoil(String recoil) { + this.recoil = recoil; + } + + public BigDecimal getStandar() { + return standar; + } + + public void setStandar(BigDecimal standar) { + this.standar = standar; + } + + public String getErfme() { + return erfme; + } + + public void setErfme(String erfme) { + this.erfme = erfme; + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/H5.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/H5.java index dbfe2ce4..4681d0e3 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/H5.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/H5.java @@ -18,6 +18,15 @@ public class H5 { private String feedbackTime; private String parentOrder; private String reason; + private String shift; + + public String getShift() { + return shift; + } + + public void setShift(String shift) { + this.shift = shift; + } public String getReason() { return reason; diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesAttendanceRecords.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesAttendanceRecords.java new file mode 100644 index 00000000..12d7fcda --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesAttendanceRecords.java @@ -0,0 +1,240 @@ +package com.op.mes.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + + +/** + * MES打卡记录对象 mes_attendance_records + * + * @author Yangwl + * @date 2025-02-19 + */ +public class MesAttendanceRecords extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 自增id */ + private String id; + + /** 用户编码 */ + @Excel(name = "用户编码") + private String userId; + + /** 用户名称 */ + @Excel(name = "用户名称") + private String userName; + + /** 考勤状态 */ + @Excel(name = "考勤状态") + private String attendanceStatus; + + /** 性别 */ + @Excel(name = "性别") + private String sex; + + /** 年龄 */ + @Excel(name = "年龄") + private Long age; + + /** 身份证号 */ + @Excel(name = "身份证号") + private String idNumber; + + /** 上班打卡时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "上班打卡时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date startTime; + + /** 上班打卡地点 */ + @Excel(name = "上班打卡地点") + private String startAddr; + + /** 下班打卡时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "下班打卡时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date endTime; + + /** 下班打开地点 */ + @Excel(name = "下班打开地点") + private String endAddr; + + /** 考勤时间段 */ + @Excel(name = "考勤时间段") + private String attendanceTime; + + /** 考勤日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "考勤日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date attendanceDate; + + /** 工作时长 */ + @Excel(name = "工作时长") + private Long workHours; + + /** 岗位 */ + @Excel(name = "岗位") + private String post; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setUserId(String userId) + { + this.userId = userId; + } + + public String getUserId() + { + return userId; + } + public void setUserName(String userName) + { + this.userName = userName; + } + + public String getUserName() + { + return userName; + } + public void setAttendanceStatus(String attendanceStatus) + { + this.attendanceStatus = attendanceStatus; + } + + public String getAttendanceStatus() + { + return attendanceStatus; + } + public void setSex(String sex) + { + this.sex = sex; + } + + public String getSex() + { + return sex; + } + public void setAge(Long age) + { + this.age = age; + } + + public Long getAge() + { + return age; + } + public void setIdNumber(String idNumber) + { + this.idNumber = idNumber; + } + + public String getIdNumber() + { + return idNumber; + } + public void setStartTime(Date startTime) + { + this.startTime = startTime; + } + + public Date getStartTime() + { + return startTime; + } + public void setStartAddr(String startAddr) + { + this.startAddr = startAddr; + } + + public String getStartAddr() + { + return startAddr; + } + public void setEndTime(Date endTime) + { + this.endTime = endTime; + } + + public Date getEndTime() + { + return endTime; + } + public void setEndAddr(String endAddr) + { + this.endAddr = endAddr; + } + + public String getEndAddr() + { + return endAddr; + } + public void setAttendanceTime(String attendanceTime) + { + this.attendanceTime = attendanceTime; + } + + public String getAttendanceTime() + { + return attendanceTime; + } + public void setAttendanceDate(Date attendanceDate) + { + this.attendanceDate = attendanceDate; + } + + public Date getAttendanceDate() + { + return attendanceDate; + } + public void setWorkHours(Long workHours) + { + this.workHours = workHours; + } + + public Long getWorkHours() + { + return workHours; + } + public void setPost(String post) + { + this.post = post; + } + + public String getPost() + { + return post; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("userId", getUserId()) + .append("userName", getUserName()) + .append("attendanceStatus", getAttendanceStatus()) + .append("sex", getSex()) + .append("age", getAge()) + .append("idNumber", getIdNumber()) + .append("startTime", getStartTime()) + .append("startAddr", getStartAddr()) + .append("endTime", getEndTime()) + .append("endAddr", getEndAddr()) + .append("attendanceTime", getAttendanceTime()) + .append("attendanceDate", getAttendanceDate()) + .append("workHours", getWorkHours()) + .append("createTime", getCreateTime()) + .append("post", getPost()) + .toString(); + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesAttendanceRecordsMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesAttendanceRecordsMapper.java new file mode 100644 index 00000000..cb7ac20f --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesAttendanceRecordsMapper.java @@ -0,0 +1,61 @@ +package com.op.mes.mapper; + +import java.util.List; +import com.op.mes.domain.MesAttendanceRecords; + +/** + * MES打卡记录Mapper接口 + * + * @author Yangwl + * @date 2025-02-19 + */ +public interface MesAttendanceRecordsMapper +{ + /** + * 查询MES打卡记录 + * + * @param id MES打卡记录主键 + * @return MES打卡记录 + */ + public MesAttendanceRecords selectMesAttendanceRecordsById(String id); + + /** + * 查询MES打卡记录列表 + * + * @param mesAttendanceRecords MES打卡记录 + * @return MES打卡记录集合 + */ + public List selectMesAttendanceRecordsList(MesAttendanceRecords mesAttendanceRecords); + + /** + * 新增MES打卡记录 + * + * @param mesAttendanceRecords MES打卡记录 + * @return 结果 + */ + public int insertMesAttendanceRecords(MesAttendanceRecords mesAttendanceRecords); + + /** + * 修改MES打卡记录 + * + * @param mesAttendanceRecords MES打卡记录 + * @return 结果 + */ + public int updateMesAttendanceRecords(MesAttendanceRecords mesAttendanceRecords); + + /** + * 删除MES打卡记录 + * + * @param id MES打卡记录主键 + * @return 结果 + */ + public int deleteMesAttendanceRecordsById(String id); + + /** + * 批量删除MES打卡记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMesAttendanceRecordsByIds(String[] ids); +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java index 0fa14b46..f9658901 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkMapper.java @@ -96,6 +96,9 @@ public interface MesReportWorkMapper { @MapKey("nameDate") Map getLineChartsDatas(MesReportProduction mesReportProduction); + @MapKey("nameDate") + Map getLineChartsDayDatas(MesReportProduction mesReportProduction); + @MapKey("name") Map getDayOfMonthDatas(MesReportProduction mesReportProduction); @@ -235,4 +238,7 @@ public interface MesReportWorkMapper { List getCXJEquNames(MesHourReport mesHourReport); int updateReportWorkW3(MesReportWork mesReportWork); + + List getReportWorksList(ConsumptionDiff consumptionDiff); + } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesAttendanceRecordsService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesAttendanceRecordsService.java new file mode 100644 index 00000000..f0819b23 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesAttendanceRecordsService.java @@ -0,0 +1,61 @@ +package com.op.mes.service; + +import java.util.List; +import com.op.mes.domain.MesAttendanceRecords; + +/** + * MES打卡记录Service接口 + * + * @author Yangwl + * @date 2025-02-19 + */ +public interface IMesAttendanceRecordsService +{ + /** + * 查询MES打卡记录 + * + * @param id MES打卡记录主键 + * @return MES打卡记录 + */ + public MesAttendanceRecords selectMesAttendanceRecordsById(String id); + + /** + * 查询MES打卡记录列表 + * + * @param mesAttendanceRecords MES打卡记录 + * @return MES打卡记录集合 + */ + public List selectMesAttendanceRecordsList(MesAttendanceRecords mesAttendanceRecords); + + /** + * 新增MES打卡记录 + * + * @param mesAttendanceRecords MES打卡记录 + * @return 结果 + */ + public int insertMesAttendanceRecords(MesAttendanceRecords mesAttendanceRecords); + + /** + * 修改MES打卡记录 + * + * @param mesAttendanceRecords MES打卡记录 + * @return 结果 + */ + public int updateMesAttendanceRecords(MesAttendanceRecords mesAttendanceRecords); + + /** + * 批量删除MES打卡记录 + * + * @param ids 需要删除的MES打卡记录主键集合 + * @return 结果 + */ + public int deleteMesAttendanceRecordsByIds(String[] ids); + + /** + * 删除MES打卡记录信息 + * + * @param id MES打卡记录主键 + * @return 结果 + */ + public int deleteMesAttendanceRecordsById(String id); +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorksService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorksService.java index dce875c5..ebdc5992 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorksService.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesReportWorksService.java @@ -1,6 +1,7 @@ package com.op.mes.service; import com.op.common.core.domain.R; +import com.op.mes.domain.ConsumptionDiff; import com.op.mes.domain.HFProduction; import com.op.mes.domain.MesProductTrace; import com.op.mes.domain.MesReportWork; @@ -11,7 +12,7 @@ import java.util.Map; public interface IMesReportWorksService { - List getReportWorksList(MesReportWork mesReportWork); + List getReportWorksList(ConsumptionDiff consumptionDiff); R mesProTask(); diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/H5ApiServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/H5ApiServiceImpl.java index d1dc4dab..9360bbe1 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/H5ApiServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/H5ApiServiceImpl.java @@ -30,7 +30,7 @@ public class H5ApiServiceImpl implements H5ApiService { public List
dailyProductDetil(String workTime) { //查询当天的生产情况 H5 h5=new H5(); - h5.setFeedbackTime(workTime); + h5.setFeedbackTime("2025-03-05"); //报工信息 List
h5List=h5ApiMapper.selectMesLineProdceList(h5); //报工信息处理 @@ -73,6 +73,7 @@ public class H5ApiServiceImpl implements H5ApiService { resultH5.setPlanProduction((int) Math.round(totalPlanProduction)); // 总和 resultH5.setProduction((int) Math.round(totalProduction)); // 总和 resultH5.setReason(list.get(0).getReason()); + resultH5.setShift(list.get(0).getShift()); return resultH5; } ) diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesAttendanceRecordsServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesAttendanceRecordsServiceImpl.java new file mode 100644 index 00000000..d0fb83a0 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesAttendanceRecordsServiceImpl.java @@ -0,0 +1,98 @@ +package com.op.mes.service.impl; + +import java.util.List; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.op.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.op.mes.mapper.MesAttendanceRecordsMapper; +import com.op.mes.domain.MesAttendanceRecords; +import com.op.mes.service.IMesAttendanceRecordsService; + +/** + * MES打卡记录Service业务层处理 + * + * @author Yangwl + * @date 2025-02-19 + */ +@Service +public class MesAttendanceRecordsServiceImpl implements IMesAttendanceRecordsService +{ + @Autowired + private MesAttendanceRecordsMapper mesAttendanceRecordsMapper; + + /** + * 查询MES打卡记录 + * + * @param id MES打卡记录主键 + * @return MES打卡记录 + */ + @Override + public MesAttendanceRecords selectMesAttendanceRecordsById(String id) + { + return mesAttendanceRecordsMapper.selectMesAttendanceRecordsById(id); + } + + /** + * 查询MES打卡记录列表 + * + * @param mesAttendanceRecords MES打卡记录 + * @return MES打卡记录 + */ + @Override + @DS("#header.poolName") + public List selectMesAttendanceRecordsList(MesAttendanceRecords mesAttendanceRecords) + { + return mesAttendanceRecordsMapper.selectMesAttendanceRecordsList(mesAttendanceRecords); + } + + /** + * 新增MES打卡记录 + * + * @param mesAttendanceRecords MES打卡记录 + * @return 结果 + */ + @Override + public int insertMesAttendanceRecords(MesAttendanceRecords mesAttendanceRecords) + { + mesAttendanceRecords.setCreateTime(DateUtils.getNowDate()); + return mesAttendanceRecordsMapper.insertMesAttendanceRecords(mesAttendanceRecords); + } + + /** + * 修改MES打卡记录 + * + * @param mesAttendanceRecords MES打卡记录 + * @return 结果 + */ + @Override + public int updateMesAttendanceRecords(MesAttendanceRecords mesAttendanceRecords) + { + return mesAttendanceRecordsMapper.updateMesAttendanceRecords(mesAttendanceRecords); + } + + /** + * 批量删除MES打卡记录 + * + * @param ids 需要删除的MES打卡记录主键 + * @return 结果 + */ + @Override + public int deleteMesAttendanceRecordsByIds(String[] ids) + { + return mesAttendanceRecordsMapper.deleteMesAttendanceRecordsByIds(ids); + } + + /** + * 删除MES打卡记录信息 + * + * @param id MES打卡记录主键 + * @return 结果 + */ + @Override + public int deleteMesAttendanceRecordsById(String id) + { + return mesAttendanceRecordsMapper.deleteMesAttendanceRecordsById(id); + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java index e5637614..5035d5f3 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkServiceImpl.java @@ -688,7 +688,7 @@ public class MesReportWorkServiceImpl implements IMesReportWorkService { //日期名称数组 List xAxisDatas = getDays(startTime,endTime); lineChartDto.setxAxisDatas(xAxisDatas); - Map productdatas = mesReportWorkMapper.getLineChartsDatas(mesReportProduction); + Map productdatas = mesReportWorkMapper.getLineChartsDayDatas(mesReportProduction); //值 List datas = new ArrayList<>(); for(String dayStr:xAxisDatas) { diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorksServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorksServiceImpl.java index 56035861..b75e924d 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorksServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorksServiceImpl.java @@ -54,8 +54,16 @@ public class MesReportWorksServiceImpl implements IMesReportWorksService { @Override @DS("#header.poolName") - public List getReportWorksList(MesReportWork mesReportWork) { - return null;//mesReportWorksMapper.getReportWorkList(mesReportWork); + public List getReportWorksList(ConsumptionDiff consumptionDiff) { + + List consumptionDiffList = mesReportWorkMapper.getReportWorksList(consumptionDiff); +// for (ConsumptionDiff consumption:consumptionDiffList){ +// if (consumption.getParentOrder().equals("0")){ +// consumption.setShould(); +// } +// } + return consumptionDiffList; + } @Override diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/H5ApiMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/H5ApiMapper.xml index f944f5e2..1a93cc0a 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/H5ApiMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/H5ApiMapper.xml @@ -19,6 +19,7 @@ + diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesAttendanceRecordsMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesAttendanceRecordsMapper.xml new file mode 100644 index 00000000..0dbd9798 --- /dev/null +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesAttendanceRecordsMapper.xml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, user_id, user_name, attendance_status, sex, age, id_number, start_time, start_addr, end_time, end_addr, attendance_time, attendance_date, work_hours, create_time, post from mes_attendance_records + + + + + + + + insert into mes_attendance_records + + id, + user_id, + user_name, + attendance_status, + sex, + age, + id_number, + start_time, + start_addr, + end_time, + end_addr, + attendance_time, + attendance_date, + work_hours, + create_time, + post, + + + #{id}, + #{userId}, + #{userName}, + #{attendanceStatus}, + #{sex}, + #{age}, + #{idNumber}, + #{startTime}, + #{startAddr}, + #{endTime}, + #{endAddr}, + #{attendanceTime}, + #{attendanceDate}, + #{workHours}, + #{createTime}, + #{post}, + + + + + update mes_attendance_records + + user_id = #{userId}, + user_name = #{userName}, + attendance_status = #{attendanceStatus}, + sex = #{sex}, + age = #{age}, + id_number = #{idNumber}, + start_time = #{startTime}, + start_addr = #{startAddr}, + end_time = #{endTime}, + end_addr = #{endAddr}, + attendance_time = #{attendanceTime}, + attendance_date = #{attendanceDate}, + work_hours = #{workHours}, + create_time = #{createTime}, + post = #{post}, + + where id = #{id} + + + + delete from mes_attendance_records where id = #{id} + + + + delete from mes_attendance_records where id in + + #{id} + + + diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml index 3934a549..201851c0 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml @@ -310,6 +310,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" )mrw group by mrw.nameDate,mrw.productCode,mrw.productName,mrw.feedbackTime + + + + + + + + + + + + + + + + + + + + + + + + insert into mes_report_work diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml index 53587308..ee076e4f 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml @@ -453,7 +453,7 @@ and pow.product_date >= CONVERT(varchar(10),DATEADD(DAY, -1, GETDATE()), 120)