|
@@ -1,5 +1,6 @@
|
|
|
package com.steerinfo.ems.trmworkprocmaterialvalue.service.impl;
|
|
|
|
|
|
+import com.steerinfo.auth.utils.JwtUtil;
|
|
|
import com.steerinfo.ems.Utils.BigDecimalUtil;
|
|
|
import com.steerinfo.ems.Utils.DateUtils;
|
|
|
import com.steerinfo.ems.formula.model.Formula;
|
|
@@ -64,7 +65,7 @@ public class TRmWorkprocMaterialValueServiceImpl extends BaseServiceImpl<TRmWork
|
|
|
ITRmMaterialService tRmMaterialService;
|
|
|
@Autowired
|
|
|
ITRmWorkprocService tRmWorkprocService;
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
protected IBaseMapper<TRmWorkprocMaterialValue, HashMap<String, Object>> getMapper() {
|
|
|
return tRmWorkprocMaterialValueMapper;
|
|
@@ -81,6 +82,8 @@ public class TRmWorkprocMaterialValueServiceImpl extends BaseServiceImpl<TRmWork
|
|
|
|
|
|
@Override
|
|
|
public TRmWorkprocMaterialValue updateForUKey(TRmWorkprocMaterialValue tRmWorkprocMaterialValue) {
|
|
|
+ tRmWorkprocMaterialValue.setUpman(JwtUtil.getUseridByToken());
|
|
|
+ tRmWorkprocMaterialValue.setUptime(DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
this.getMapper().updateByPrimaryKeySelective(tRmWorkprocMaterialValue);
|
|
|
return tRmWorkprocMaterialValueMapper.selectByUPrimaryKey(tRmWorkprocMaterialValue);
|
|
|
}
|
|
@@ -370,7 +373,7 @@ public class TRmWorkprocMaterialValueServiceImpl extends BaseServiceImpl<TRmWork
|
|
|
}
|
|
|
logger.info("[投入数据添加完毕]" + DateUtils.dateStr(new Date(), "yyyy-MM-dd HH:mm:ss") + ":数据添加成功" + success + "条(其中修改数据为" + delSize + "条),放弃" + abandon + "条,失败" + failure + "条;");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 原料购入0数据处理(type=4)
|
|
|
*/
|
|
@@ -559,7 +562,7 @@ public class TRmWorkprocMaterialValueServiceImpl extends BaseServiceImpl<TRmWork
|
|
|
}
|
|
|
logger.info("[原料购入数据添加完毕]" + DateUtils.dateStr(new Date(), "yyyy-MM-dd HH:mm:ss") + ":数据添加成功" + success + "条(其中修改数据为" + delSize + "条),放弃" + abandon + "条,失败" + failure + "条;");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 原料库存-数据处理(type=5)
|
|
|
*/
|
|
@@ -723,6 +726,8 @@ public class TRmWorkprocMaterialValueServiceImpl extends BaseServiceImpl<TRmWork
|
|
|
//最终值
|
|
|
tv.setApportvalue(swapfile.getQty());
|
|
|
tv.setBz("MES-" + new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date()) + " fid:" + swapfile.getFid());
|
|
|
+ tv.setUserid("系统");
|
|
|
+ tv.setUpdatetime(DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
tRmWorkprocMaterialValueMapper.insert(tv);
|
|
|
}
|
|
|
success++;
|
|
@@ -980,6 +985,8 @@ public class TRmWorkprocMaterialValueServiceImpl extends BaseServiceImpl<TRmWork
|
|
|
tv.setCorrectvalue(new BigDecimal(0));
|
|
|
//最终值
|
|
|
tv.setApportvalue(new BigDecimal(actualvalue));
|
|
|
+ tv.setUserid("系统");
|
|
|
+ tv.setUpdatetime(DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
tRmWorkprocMaterialValueMapper.insert(tv);
|
|
|
}
|
|
|
} else if((timegranid.equalsIgnoreCase("MONTH") || timegranid.equalsIgnoreCase("YEAR"))){
|
|
@@ -1118,4 +1125,4 @@ public class TRmWorkprocMaterialValueServiceImpl extends BaseServiceImpl<TRmWork
|
|
|
}
|
|
|
|
|
|
|
|
|
-}
|
|
|
+}
|