|
@@ -56,28 +56,28 @@ public class TmstruckSelfMachineService implements ITmstruckSelfMachineService {
|
|
|
//1.根据运输订单号查询主干信息
|
|
|
map = tmstruckLeaveFactoryResultMapper.getDeliveryOrder(orderNumber);
|
|
|
//备注信息的查找以及修改
|
|
|
- String note=tmstruckLeaveFactoryResultMapper.querynote(orderNumber);
|
|
|
- Date date=tmstruckLeaveFactoryResultMapper.queryDate(orderNumber);
|
|
|
- if (date!=null&&!("".equals(date))){
|
|
|
- map.put("note",note);
|
|
|
- }else {
|
|
|
- if(note!=null&&!("".equals(note))){
|
|
|
- String regex="\\d{1,2}\\.\\d{1,2}";
|
|
|
- Pattern pattern=Pattern.compile(regex);
|
|
|
- Matcher matcher=pattern.matcher(note);
|
|
|
- StringBuffer stringBuffer=new StringBuffer();
|
|
|
- stringBuffer.append(note);
|
|
|
- String partOfNote = tmstruckLeaveFactoryResultMapper.querypartOfNote(orderNumber);
|
|
|
- while (matcher.find()){
|
|
|
- String group = matcher.group();
|
|
|
- /*note=note.replace(group,partOfNote);*/
|
|
|
- note=matcher.replaceAll(partOfNote);
|
|
|
- }
|
|
|
-
|
|
|
- }else {
|
|
|
- map.put("note","");
|
|
|
- }
|
|
|
- }
|
|
|
+ //String note=tmstruckLeaveFactoryResultMapper.querynote(orderNumber);
|
|
|
+ //Date date=tmstruckLeaveFactoryResultMapper.queryDate(orderNumber);
|
|
|
+ //if (date!=null&&!("".equals(date))){
|
|
|
+ // map.put("note",note);
|
|
|
+ //}else {
|
|
|
+ // if(note!=null&&!("".equals(note))){
|
|
|
+ // String regex="\\d{1,2}\\.\\d{1,2}";
|
|
|
+ // Pattern pattern=Pattern.compile(regex);
|
|
|
+ // Matcher matcher=pattern.matcher(note);
|
|
|
+ // StringBuffer stringBuffer=new StringBuffer();
|
|
|
+ // stringBuffer.append(note);
|
|
|
+ // String partOfNote = tmstruckLeaveFactoryResultMapper.querypartOfNote(orderNumber);
|
|
|
+ // while (matcher.find()){
|
|
|
+ // String group = matcher.group();
|
|
|
+ // /*note=note.replace(group,partOfNote);*/
|
|
|
+ // note=matcher.replaceAll(partOfNote);
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // }else {
|
|
|
+ // map.put("note","");
|
|
|
+ // }
|
|
|
+ //}
|
|
|
map.put("orderNumber",orderNumber);
|
|
|
if(map !=null){
|
|
|
List<Map<String, Object>> deliveryOrderMaterialList = tmstruckLeaveFactoryResultMapper.getDeliveryOrderMaterial(orderNumber);
|
|
@@ -91,9 +91,22 @@ public class TmstruckSelfMachineService implements ITmstruckSelfMachineService {
|
|
|
//判断是实重还是理重的标志
|
|
|
BigDecimal isPoundSale = (BigDecimal) map1.get("isPoundSale");
|
|
|
//判断是否为盘螺materialName.contains("盘螺")||materialName.contains("盘元")
|
|
|
+ //根据运输订单号查找实绩重量
|
|
|
+ List<Map<String, Object>> netWeightlist = tmstruckLeaveFactoryResultMapper.getNetWeightByOrder(map);
|
|
|
+ for (Map<String, Object> stringObjectMap : netWeightlist) {
|
|
|
+ BigDecimal materialid1 = (BigDecimal) stringObjectMap.get("materialid");
|
|
|
+ if(materialid1 !=null&&!("".equals(materialid1))){
|
|
|
+ if (materialid.compareTo(materialid1) == 0) {
|
|
|
+ BigDecimal nowNetWeight = (BigDecimal) stringObjectMap.get("nowNetWeight");
|
|
|
+ if (nowNetWeight != null) {
|
|
|
+ map1.put("netWeightTime",stringObjectMap.get("netWeightTime"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ map1.put("netWeightTime", "");
|
|
|
+ }
|
|
|
+ }
|
|
|
if (isPoundSale !=null && isPoundSale.compareTo(BigDecimal.valueOf(0))==0){
|
|
|
- //根据运输订单号查找实绩重量
|
|
|
- List<Map<String, Object>> netWeightlist = tmstruckLeaveFactoryResultMapper.getNetWeightByOrder(map);
|
|
|
for (Map<String, Object> stringObjectMap : netWeightlist) {
|
|
|
BigDecimal materialid1 = (BigDecimal) stringObjectMap.get("materialid");
|
|
|
if(materialid1 !=null&&!("".equals(materialid1))){
|