|
@@ -19,6 +19,7 @@ import javax.xml.namespace.QName;
|
|
import javax.xml.ws.Service;
|
|
import javax.xml.ws.Service;
|
|
|
|
|
|
import com.alibaba.druid.support.json.JSONUtils;
|
|
import com.alibaba.druid.support.json.JSONUtils;
|
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
@@ -362,10 +363,10 @@ public class FbsWorkingStatisticsController {
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
return new ResponseEntity<ResHttpStatus>(res, HttpStatus.OK);
|
|
}
|
|
}
|
|
|
|
|
|
- String[] batchCode = entity.getBatchCode().split(",");
|
|
+
|
|
- if(batchCode.length > 0){
|
|
+
|
|
- entity.setQualifiedNumber(String.valueOf(batchCode.length));
|
|
+
|
|
- }
|
|
+
|
|
|
|
|
|
if(StringUtils.isBlank(entity.getState())){
|
|
if(StringUtils.isBlank(entity.getState())){
|
|
res.setCode("1");
|
|
res.setCode("1");
|
|
@@ -500,17 +501,17 @@ public class FbsWorkingStatisticsController {
|
|
public Object[] saveU8(FbsWorkingStatistics entity,FbsWorkshopDispatchList workshopDispatchList,BigDecimal allHors){
|
|
public Object[] saveU8(FbsWorkingStatistics entity,FbsWorkshopDispatchList workshopDispatchList,BigDecimal allHors){
|
|
Object[] mapR=new Object[]{};
|
|
Object[] mapR=new Object[]{};
|
|
if(StringUtils.isNotBlank(entity.getBatchCode())){
|
|
if(StringUtils.isNotBlank(entity.getBatchCode())){
|
|
- String[] batchCodes=entity.getBatchCode().split(",");
|
|
|
|
List<Map<String,Object>> mapList=new ArrayList<>();
|
|
List<Map<String,Object>> mapList=new ArrayList<>();
|
|
- for(String batchCode:batchCodes){
|
|
+
|
|
- int i=1;
|
|
+ JSONArray jsonArray = JSONArray.parseArray(entity.getBatchCode());
|
|
|
|
+ for(int i=0;i<jsonArray.size();i++){
|
|
|
|
|
|
Map<String,Object> itemMap=new LinkedHashMap<>();
|
|
Map<String,Object> itemMap=new LinkedHashMap<>();
|
|
itemMap.put("CINVCODE",workshopDispatchList.getProductId());
|
|
itemMap.put("CINVCODE",workshopDispatchList.getProductId());
|
|
- itemMap.put("IQUANTITY",1);
|
|
+ itemMap.put("IQUANTITY",jsonArray.getJSONObject(i).get("value"));
|
|
itemMap.put("MOCODE",workshopDispatchList.getProductionOrderNumberName());
|
|
itemMap.put("MOCODE",workshopDispatchList.getProductionOrderNumberName());
|
|
itemMap.put("MOROWMO",entity.getRowNumber());
|
|
itemMap.put("MOROWMO",entity.getRowNumber());
|
|
- itemMap.put("CBATCH",batchCode);
|
|
+ itemMap.put("CBATCH",jsonArray.getJSONObject(i).get("key"));
|
|
itemMap.put("cDefine27",allHors.doubleValue());
|
|
itemMap.put("cDefine27",allHors.doubleValue());
|
|
Double number=Double.valueOf(entity.getQualifiedNumber());
|
|
Double number=Double.valueOf(entity.getQualifiedNumber());
|
|
Double working=Double.valueOf(workshopDispatchList.getStandardWorkingHoursZ());
|
|
Double working=Double.valueOf(workshopDispatchList.getStandardWorkingHoursZ());
|
|
@@ -518,8 +519,27 @@ public class FbsWorkingStatisticsController {
|
|
String workingTatol=df.format(number*working);
|
|
String workingTatol=df.format(number*working);
|
|
itemMap.put("cDefine26",workingTatol);
|
|
itemMap.put("cDefine26",workingTatol);
|
|
mapList.add(itemMap);
|
|
mapList.add(itemMap);
|
|
- i++;
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
Map<String,Object> map=new LinkedHashMap<>();
|
|
Map<String,Object> map=new LinkedHashMap<>();
|
|
map.put("CSTORENAME","100");
|
|
map.put("CSTORENAME","100");
|