质量问题修改8

master
zhaoxiaolin 1 year ago
parent 72512329ae
commit 272b52b9e1

@ -185,6 +185,7 @@ public class QuaController extends BaseController {
*/ */
@PostMapping(value = "commitCheckResults") @PostMapping(value = "commitCheckResults")
public AjaxResult commitCheckResults(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) { public AjaxResult commitCheckResults(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) {
DynamicDataSourceContextHolder.push(qcCheckTaskIncome.getFactoryCode());
if(CollectionUtils.isEmpty(qcCheckTaskIncome.getQcCheckTaskDetails())){ if(CollectionUtils.isEmpty(qcCheckTaskIncome.getQcCheckTaskDetails())){
return error("[List<QcCheckTaskDetail>]不能为空"); return error("[List<QcCheckTaskDetail>]不能为空");
} }

@ -551,7 +551,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public int commitCheckResults(QcCheckTaskIncome qcCheckTaskIncome) { public int commitCheckResults(QcCheckTaskIncome qcCheckTaskIncome) {
List<QcCheckTaskDetail> details = qcCheckTaskIncome.getQcCheckTaskDetails(); List<QcCheckTaskDetail> details = qcCheckTaskIncome.getQcCheckTaskDetails();
DynamicDataSourceContextHolder.push(qcCheckTaskIncome.getFactoryCode());
Date nowTime = DateUtils.getNowDate(); Date nowTime = DateUtils.getNowDate();
String factoryCode = qcCheckTaskIncome.getFactoryCode(); String factoryCode = qcCheckTaskIncome.getFactoryCode();
String updateBy = qcCheckTaskIncome.getUpdateBy(); String updateBy = qcCheckTaskIncome.getUpdateBy();
@ -655,7 +655,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
oaR = this.createProduceOA(qcCheckTaskIncome); oaR = this.createProduceOA(qcCheckTaskIncome);
}else if("product".equals(qcCheckTaskIncome.getTypeCode())) { }else if("product".equals(qcCheckTaskIncome.getTypeCode())) {
//TODO;不走OA //TODO;不走OA
oaR.put("code","200"); oaR.put("code","500");
} }
if(oaR!=null && (oaR.get("code").toString()).equals("200")){ if(oaR!=null && (oaR.get("code").toString()).equals("200")){
/**qc_check_unqualified**/ /**qc_check_unqualified**/

@ -51,9 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status, qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status, qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,
qct.create_by,qct.create_time, qct.update_by, qct.update_time,qct.check_type,qct.noOk_quality, qct.create_by,qct.create_time, qct.update_by, qct.update_time,qct.check_type,qct.noOk_quality,
q.type_code qct.type_code
from qc_check_task qct from qc_check_task qct
left join qc_check_type q on q.id = qct.check_type
<where> <where>
<if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if> <if test="checkNo != null and checkNo != ''"> and qct.check_no = #{checkNo}</if>
<if test="incomeBatchNo != null and incomeBatchNo != ''"> and qct.income_batch_no = #{incomeBatchNo}</if> <if test="incomeBatchNo != null and incomeBatchNo != ''"> and qct.income_batch_no = #{incomeBatchNo}</if>
@ -76,7 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="checkTimeStart != null "> and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if> <if test="checkTimeStart != null "> and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if>
<if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if> <if test="checkTimeEnd != null "> and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
<if test="checkType != null "> and qct.check_type = #{checkType} </if> <if test="checkType != null "> and qct.check_type = #{checkType} </if>
<if test="typeCode != null "> and q.type_code = #{typeCode} </if> <if test="typeCode != null "> and qct.type_code = #{typeCode} </if>
</where> </where>
</select> </select>

@ -354,6 +354,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
GROUP BY qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit, GROUP BY qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_type,CONVERT(varchar(10),qct.create_time, 120) qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_type,CONVERT(varchar(10),qct.create_time, 120)
) t order by t.order_no,t.createTimeStr desc ) t
where 1=1
<if test="checkType != null ">
and t.check_type = #{checkType}
</if>
order by t.order_no,t.createTimeStr desc
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save