质量看板请求头修改,增加批次查询。

master
Yangwl 3 days ago
parent 2e1e74c47b
commit 3e2e8467aa

@ -179,13 +179,7 @@ public class DeviceInterfaceController {
*/ */
@GetMapping("/getDeviceRefreshTime") @GetMapping("/getDeviceRefreshTime")
public AjaxResult getDeviceRefreshTime(EquOperation equOperation) { public AjaxResult getDeviceRefreshTime(EquOperation equOperation) {
DynamicDataSourceContextHolder.push(equOperation.getPoolName()); return deviceInterfaceService.getDeviceRefreshTime(equOperation);
try {
return deviceInterfaceService.getDeviceRefreshTime(equOperation);
}finally {
DynamicDataSourceContextHolder.poll();
}
} }
/** /**

@ -193,7 +193,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
* *
*/ */
@Override @Override
@DS("master") @DS("#header.poolName")
public AjaxResult getDeviceRefreshTime(EquOperation equOperation) { public AjaxResult getDeviceRefreshTime(EquOperation equOperation) {
String refreshTime = deviceInterfaceMapper.getDeviceRefreshTime(equOperation); String refreshTime = deviceInterfaceMapper.getDeviceRefreshTime(equOperation);
int time = Integer.parseInt(refreshTime); int time = Integer.parseInt(refreshTime);

@ -182,7 +182,7 @@ public class MesReportWorksController extends BaseController {
/** /**
* *
**/ **/
@PostMapping("/mesProTask") @PostMapping("/updateEquRunTime")
public R updateEquRunTime() { public R updateEquRunTime() {
return mesReportWorksService.updateEquRunTime(); return mesReportWorksService.updateEquRunTime();
} }

@ -5,6 +5,7 @@ import com.op.common.core.annotation.Excel;
import com.op.common.core.web.domain.BaseEntity; import com.op.common.core.web.domain.BaseEntity;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Date; import java.util.Date;
public class MesDailyReportVo extends BaseEntity { public class MesDailyReportVo extends BaseEntity {
@ -72,7 +73,7 @@ public class MesDailyReportVo extends BaseEntity {
private String manStandard;//标准用人 private String manStandard;//标准用人
//计划产量 //计划产量
// 实际用人 // 实际用人
@Excel(name = "实际用人") @Excel(name = "实际用人", scale = 2,roundingMode = BigDecimal.ROUND_HALF_UP)
private BigDecimal useMan; private BigDecimal useMan;
private String workorderName; private String workorderName;

@ -631,6 +631,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="machineCode != null and machineCode != ''"> and machine_code = #{machineCode}</if> <if test="machineCode != null and machineCode != ''"> and machine_code = #{machineCode}</if>
<if test="machineName != null and machineName != ''"> and machine_name like concat('%', #{machineName}, '%')</if> <if test="machineName != null and machineName != ''"> and machine_name like concat('%', #{machineName}, '%')</if>
<if test="uploadStatus != null and uploadStatus != ''"> and upload_status = #{uploadStatus}</if> <if test="uploadStatus != null and uploadStatus != ''"> and upload_status = #{uploadStatus}</if>
<if test="batch != null and batch != ''"> and batch like concat('%', #{batch}, '%') </if>
group by workorder_code, product_code,product_name,machine_code,machine_name,shift_code group by workorder_code, product_code,product_name,machine_code,machine_name,shift_code
,upload_status,unit ,upload_status,unit
,upload_time,upload_msg ,upload_time,upload_msg

@ -99,17 +99,13 @@ public class QcInterfaceServiceImpl implements IQcInterfaceService {
} }
@Override @Override
@DS("#header.poolName")
public List<QcInterface> getCheckProjectsPie(QcInterface qcInterface) { public List<QcInterface> getCheckProjectsPie(QcInterface qcInterface) {
DynamicDataSourceContextHolder.push(qcInterface.getFactoryCode());
try {
String nowYMD = DateUtils.getDate(); String nowYMD = DateUtils.getDate();
qcInterface.setYmd(nowYMD); qcInterface.setYmd(nowYMD);
List<QcInterface> dtos = qcInterfaceMapper.getCheckProjectsPie1(qcInterface); List<QcInterface> dtos = qcInterfaceMapper.getCheckProjectsPie1(qcInterface);
return dtos; return dtos;
}finally {
DynamicDataSourceContextHolder.poll();
}
} }
@ -199,9 +195,9 @@ public class QcInterfaceServiceImpl implements IQcInterfaceService {
} }
@Override @Override
@DS("#header.poolName")
public Map<String, String> getProduceStaticInfo(QcInterface qcInterface) { public Map<String, String> getProduceStaticInfo(QcInterface qcInterface) {
DynamicDataSourceContextHolder.push(qcInterface.getFactoryCode());
try {
String nowYMD = DateUtils.getDate(); String nowYMD = DateUtils.getDate();
qcInterface.setYmd(nowYMD); qcInterface.setYmd(nowYMD);
@ -252,33 +248,21 @@ public class QcInterfaceServiceImpl implements IQcInterfaceService {
} }
} }
return dtoMap; return dtoMap;
}finally {
DynamicDataSourceContextHolder.poll();
}
} }
@Override @Override
@DS("#header.poolName")
public List<QcInterface> getProduceNoOkList(QcInterface qcInterface) { public List<QcInterface> getProduceNoOkList(QcInterface qcInterface) {
DynamicDataSourceContextHolder.push(qcInterface.getFactoryCode());
try {
List<QcInterface> dtos = qcInterfaceMapper.getProduceNoOkList1(qcInterface); List<QcInterface> dtos = qcInterfaceMapper.getProduceNoOkList1(qcInterface);
return dtos; return dtos;
}finally {
DynamicDataSourceContextHolder.poll();
}
// String nowYMD = DateUtils.getDate();
// qcInterface.setYmd(nowYMD);
// List<QcInterface> dtos = qcInterfaceMapper.getProduceNoOkList(qcInterface);
} }
@Override @Override
@DS("#header.poolName")
public Map<String, List<String>> getProMonthNoOk(QcInterface qcInterface) { public Map<String, List<String>> getProMonthNoOk(QcInterface qcInterface) {
DynamicDataSourceContextHolder.push(qcInterface.getFactoryCode());
Map<String, List<String>> dtoMap = new HashMap<>(); Map<String, List<String>> dtoMap = new HashMap<>();
try {
String nowYMD = DateUtils.getDate(); String nowYMD = DateUtils.getDate();
String[] nowYMDs = nowYMD.split("-"); String[] nowYMDs = nowYMD.split("-");
int nowMonth = Integer.parseInt(nowYMDs[1]); int nowMonth = Integer.parseInt(nowYMDs[1]);
@ -313,17 +297,12 @@ public class QcInterfaceServiceImpl implements IQcInterfaceService {
// dtoMap.put("month", monthNames0); // dtoMap.put("month", monthNames0);
// dtoMap.put("monthData", monthData0); // dtoMap.put("monthData", monthData0);
// /**质量看板测试结束**/ // /**质量看板测试结束**/
}finally {
DynamicDataSourceContextHolder.poll();
}
return dtoMap; return dtoMap;
} }
@Override @Override
@DS("#header.poolName")
public QcInterface getLineDayNoOk(QcInterface qcInterface) { public QcInterface getLineDayNoOk(QcInterface qcInterface) {
DynamicDataSourceContextHolder.push(qcInterface.getFactoryCode());
try {
QcInterface dto = new QcInterface(); QcInterface dto = new QcInterface();
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
@ -368,16 +347,14 @@ public class QcInterfaceServiceImpl implements IQcInterfaceService {
} }
dto.setSeries(series);// dto.setSeries(series);//
return dto; return dto;
}finally {
DynamicDataSourceContextHolder.poll();
}
} }
@Override @Override
@DS("#header.poolName")
public List<QcInterface> getMonthOfYearContrast(QcInterface qcInterface) { public List<QcInterface> getMonthOfYearContrast(QcInterface qcInterface) {
DynamicDataSourceContextHolder.push(qcInterface.getFactoryCode());
List<QcInterface> dtos = new ArrayList<>(); List<QcInterface> dtos = new ArrayList<>();
try {
QcInterface nowYM = new QcInterface(); QcInterface nowYM = new QcInterface();
QcInterface lastYM = new QcInterface(); QcInterface lastYM = new QcInterface();
String nowYMD = DateUtils.getDate(); String nowYMD = DateUtils.getDate();
@ -438,9 +415,7 @@ public class QcInterfaceServiceImpl implements IQcInterfaceService {
dtos.add(lastYM); dtos.add(lastYM);
dtos.add(nowYM); dtos.add(nowYM);
}finally {
DynamicDataSourceContextHolder.poll();
}
return dtos; return dtos;
} }

Loading…
Cancel
Save