Commit ba9bee0d authored by lcl's avatar lcl

u

parent e843445c
......@@ -78,9 +78,9 @@ public class CbQuantitySummaryActual implements Serializable {
*/
private Date createTime;
/**
* 更新人id
* 更新人
*/
private Long updateId;
private String updateBy;
/**
* 更新时间
*/
......
......@@ -107,13 +107,13 @@ public class CbQuantitySummaryServiceImpl extends ServiceImpl<CbQuantitySummaryM
@Transactional(rollbackFor = Exception.class)
public void updateActual(List<CbQuantitySummaryActual> list) {
if (ObjectUtils.isEmpty(list)) throw new BeanException("数据不能为空");
Long userId = LoginHelper.getUserId();
String nickName = LoginHelper.getLoginUser().getNickname();
for (CbQuantitySummaryActual actual : list) {
if (ObjectUtils.isEmpty(actual.getCbQuantitySummaryId())) throw new BeanException("基础数据id不能为空!");
if (ObjectUtils.isEmpty(actual.getQuantities())) throw new BeanException("工程量(本月用料)不能为空!");
if (ObjectUtils.isEmpty(actual.getRecordDate())) throw new BeanException("填写月份不能为空!");
actual.setId(ObjectUtils.isEmpty(actual.getId()) ? SecureUtil.md5(actual.getCbQuantitySummaryId() + actual.getRecordDate()) : actual.getId());
actual.setUpdateId(userId);
actual.setUpdateBy(nickName);
boolean b = baseActualService.saveOrUpdate(actual);
if (!b) {
log.error("CbQuantitySummaryServiceImpl.updateActual() data insert error! data:" + JSONUtil.toJsonStr(actual));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment