PLC下线计数同步

master
Yangwl 2 months ago
parent 148671da8f
commit a6ab7a3cdc

@ -46,6 +46,18 @@ public class MesBoardController extends BaseController {
return success(iMesBoradService.getProduction15Days(mesBoard));
}
/**获取PLC采集的完成数量*/
@PostMapping("/getProductionNumberPLC")
public AjaxResult getProductionNumberPLC(@RequestBody BoardDTO mesBoard) {
if (StringUtils.isBlank(mesBoard.getFactoryCode())) {
return error("[facotryCode] 不能为空");
}
if (StringUtils.isBlank(mesBoard.getEquCode())) {
return error("[equCode] 不能为空");
}
return success(iMesBoradService.getProductionNumberPLC(mesBoard));
}
/**产线信息**/
@PostMapping("/getProductionLineInfo")
public AjaxResult getProductionLineInfo(@RequestBody BoardDTO mesBoard) {

@ -247,6 +247,7 @@ public class MesReportWorkController extends BaseController {
List<MesDailyReport> list = mesReportWorkService.getDailyReport(mesDailyReport);
return getDataTable(list);
}
@RequiresPermissions("mes:dailyReport:list")
@GetMapping("/getDailyReportNew")
@Log(title = "生成日报表查询", businessType = BusinessType.QUERY)

@ -68,6 +68,8 @@ public class MesDailyReportVo extends BaseEntity {
private String teamCode;
private String teamDesc;
@Excel(name = "标准用人")
private String manStandard;//标准用人
//计划产量
// 实际用人
@Excel(name = "实际用人")
@ -76,8 +78,7 @@ public class MesDailyReportVo extends BaseEntity {
private String workorderName;
private String quantity;//计划产量(箱)
@Excel(name = "标准用人")
private String manStandard;//标准用人
@Excel(name = "标准工时")
private String workTimeStandard;//工时-标准
@Excel(name = "实际工时")

@ -117,4 +117,7 @@ public interface MesMapper {
List<Map> getWhiteBoardProdDetails(Map paramMap);
List<Map> whiteBoardProdListDetailss(Map paramMap);
Map getProductionNumberPLC(BoardDTO mesBoard);
}

@ -22,4 +22,6 @@ public interface IMesBoradService {
public List<BoardDTO> getHFQcInfo(BoardDTO mesBoard);
public List<BoardDTO> getHFxlInfo(BoardDTO mesBoard);
public Map getProductionNumberPLC(BoardDTO mesBoard);
}

@ -213,6 +213,8 @@ public class MesBoradServiceImpl implements IMesBoradService {
return dtos;
}
//获取当前日期前几天
private List<String> getDays(int dayNum){
List<String> days = new ArrayList<>();
@ -230,7 +232,12 @@ public class MesBoradServiceImpl implements IMesBoradService {
return days;
}
@Override
public Map getProductionNumberPLC(BoardDTO mesBoard) {
DynamicDataSourceContextHolder.push(mesBoard.getFactoryCode());
Map mapList = mesMapper.getProductionNumberPLC(mesBoard);
return mapList;
}
public static void main(String[] args){
List<String> days = new ArrayList<>();

@ -374,7 +374,8 @@
pow.workorder_code workorderCode,
pow.product_name productName,
powb.batch_code batchCode,
powb.batch_quantity quantitySplit
powb.batch_quantity quantitySplit,
pow.status
from pro_order_workorder pow
left join pro_order_workorder_batch powb on powb.workorder_id = pow.workorder_id
where pow.del_flag = '0' and CONVERT(varchar(10),pow.product_date, 120) = CONVERT(varchar(10),GETDATE(), 120)
@ -530,5 +531,18 @@
ORDER BY
equipmentCode ASC;
</select>
<select id="getProductionNumberPLC" resultType="java.util.Map">
SELECT
line_code,
workorder_code,
qty_build,
qty_total
FROM
pro_workbatch_inwork
WHERE
line_code =#{ equCode }
AND workorder_code =#{ workorderCode}
</select>
</mapper>

Loading…
Cancel
Save