|
@@ -637,7 +637,7 @@ public class BusinessServiceImpl implements BusinessService{
|
|
|
|
|
|
jdbcService.update("update a_defective_products set if_defective=1,updated_at=now(),updated_by=? where id=?",getUserId(),id);
|
|
|
|
|
|
- String insertSql="INSERT INTO a_defective_products_detail (`defective_products_id`, `amount`, `ifDefective`, `created_at`, `created_by`, `seq`) VALUES (?, ?, ?, ?, ?, ?);\n";
|
|
|
+ String insertSql="INSERT INTO a_defective_products_detail (`defective_products_id`, `amount`, `ifDefective`, `created_at`, `created_by`, `seq`,remark) VALUES (?, ?, ?, ?, ?, ?,?);\n";
|
|
|
StringBuffer insert=new StringBuffer("INSERT INTO a_work_report_record ( production_work_order_id, report_amount, created_at, created_by) " +
|
|
|
"VALUES ( ?, ?, ?, ?);");
|
|
|
String scrap="INSERT INTO a_work_scrap ( scrap_code, work_code, scrap_amount, scrap_person, scrap_reason, apply_status, create_time, production_work_order_id,scrap_file) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
|
@@ -645,14 +645,15 @@ public class BusinessServiceImpl implements BusinessService{
|
|
|
Map m = list.get(i);
|
|
|
Integer detailAmount = Integer.valueOf(m.get("amount").toString());
|
|
|
Integer ifdefective = Integer.valueOf(m.get("ifdefective").toString());
|
|
|
- jdbcService.insert("insert",insertSql,id,detailAmount,ifdefective,new Date(),getUserId(),i);
|
|
|
+ String remark = m.get("remark").toString();
|
|
|
+ jdbcService.insert("insert",insertSql,id,detailAmount,ifdefective,new Date(),getUserId(),i,remark);
|
|
|
|
|
|
if (ifdefective==1){
|
|
|
jdbcService.update("update a_production_work_order set report_amount=report_amount+"+detailAmount+" where id=?",productionWorkOrderId);
|
|
|
jdbcService.insert("执行insert",insert.toString(),productionWorkOrderId,detailAmount,new Date(),getUserId());
|
|
|
} else if (ifdefective==2) {
|
|
|
jdbcService.update("update a_production_work_order set scrap_amount=scrap_amount+"+detailAmount+" where id=?",productionWorkOrderId);
|
|
|
- jdbcService.insert("执行sql",scrap,generateSerial.generateSerialNumber("aWorkScrap"),workCode,detailAmount,getUserId(),null,0,new Date(),productionWorkOrderId,null);
|
|
|
+ jdbcService.insert("执行sql",scrap,generateSerial.generateSerialNumber("aWorkScrap"),workCode,detailAmount,getUserId(),remark,0,new Date(),productionWorkOrderId,null);
|
|
|
}
|
|
|
|
|
|
}
|