|
|
|
@ -2994,7 +2994,11 @@ public class QcServiceImpl implements QcService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
data.setState("待审核"); |
|
|
|
if ("1".equals(data.getType())) { // 应用 |
|
|
|
data.setState("待检验"); |
|
|
|
} else { // 保存 |
|
|
|
data.setState("待审核"); |
|
|
|
} |
|
|
|
qcMapper.updateFQASMasterRecord(data); |
|
|
|
// 修改明细记录信息 |
|
|
|
for (int i = 0; i < data.getItemList().size(); i++) { |
|
|
|
@ -3032,31 +3036,31 @@ public class QcServiceImpl implements QcService { |
|
|
|
if (!operators.isEmpty()) { |
|
|
|
qcMapper.saveOperator(operators); |
|
|
|
} |
|
|
|
// 查看自动审核动控 |
|
|
|
SysSceneDynamicControlModelEntity controlModel = new SysSceneDynamicControlModelEntity(); |
|
|
|
controlModel.setSite(data.getSite()); |
|
|
|
controlModel.setControlNo("10005"); |
|
|
|
List<SysSceneDynamicControlModelEntity> controlList = qcMapper.queryController(controlModel); |
|
|
|
if ("控制".equals(controlList.get(0).getBaseData())) { |
|
|
|
// 查询检验单 |
|
|
|
QcFAIRecordData record = qcMapper.getFQASInspectionRecord(data); |
|
|
|
// 修改主记录标识为已提交 |
|
|
|
qcMapper.updateFQASMasterSubmitFlag(record); |
|
|
|
// 修改明细记录标识为已提交 |
|
|
|
qcMapper.updateFQASDetailSubmitFlag(record); |
|
|
|
// 修改子明细记录标识为已提交 |
|
|
|
qcMapper.updateFQASSubDetailSubmitFlag(record); |
|
|
|
if ("生产入库检验".equals(record.getOrderRefType())) { |
|
|
|
// 调用存储过程执行 |
|
|
|
Map<String, Object> resultMap = this.dboSaveFQASSubmitResult(record); |
|
|
|
// 判断是否检验成功 |
|
|
|
String code = String.valueOf(resultMap.get("resultCode")); |
|
|
|
if ("400".equalsIgnoreCase(code)) { |
|
|
|
String msg = String.valueOf(resultMap.get("resultMsg")); |
|
|
|
throw new XJException(msg, Integer.parseInt(code)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// // 查看自动审核动控 |
|
|
|
// SysSceneDynamicControlModelEntity controlModel = new SysSceneDynamicControlModelEntity(); |
|
|
|
// controlModel.setSite(data.getSite()); |
|
|
|
// controlModel.setControlNo("10005"); |
|
|
|
// List<SysSceneDynamicControlModelEntity> controlList = qcMapper.queryController(controlModel); |
|
|
|
// if ("控制".equals(controlList.get(0).getBaseData())) { |
|
|
|
// // 查询检验单 |
|
|
|
// QcFAIRecordData record = qcMapper.getFQASInspectionRecord(data); |
|
|
|
// // 修改主记录标识为已提交 |
|
|
|
// qcMapper.updateFQASMasterSubmitFlag(record); |
|
|
|
// // 修改明细记录标识为已提交 |
|
|
|
// qcMapper.updateFQASDetailSubmitFlag(record); |
|
|
|
// // 修改子明细记录标识为已提交 |
|
|
|
// qcMapper.updateFQASSubDetailSubmitFlag(record); |
|
|
|
// if ("生产入库检验".equals(record.getOrderRefType())) { |
|
|
|
// // 调用存储过程执行 |
|
|
|
// Map<String, Object> resultMap = this.dboSaveFQASSubmitResult(record); |
|
|
|
// // 判断是否检验成功 |
|
|
|
// String code = String.valueOf(resultMap.get("resultCode")); |
|
|
|
// if ("400".equalsIgnoreCase(code)) { |
|
|
|
// String msg = String.valueOf(resultMap.get("resultMsg")); |
|
|
|
// throw new XJException(msg, Integer.parseInt(code)); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|