Browse Source

[fix]工程管理:

修改物料的时间显示不准问题
dev
liuxiaoxu 7 months ago
parent
commit
1661fb87c0
  1. 2
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java
  2. 4
      ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpMaterial.java
  3. 2
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java
  4. 14
      ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml

2
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java

@ -132,6 +132,8 @@ public class ErpDevelopModifyorderController extends BaseController
/**
* 查看开发修改单详情
* */
@RequiresPermissions("erp:developModifyOrder:detail")
@Log(title = "开发修改单", businessType = BusinessType.OTHER)
@GetMapping("/detail/{developOrderId}")
public String detail(@PathVariable("developOrderId") Long developOrderId, ModelMap mmap){
ErpDevelopModifyorder erpDevelopModifyorder = erpDevelopModifyorderService.selectErpDevelopModifyorderById(developOrderId);

4
ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpMaterial.java

@ -446,6 +446,10 @@ public class ErpMaterial extends BaseEntity
.append("itemName", getItemName())
.append("supplierId",getSupplierId())
.append("supplierName",getSupplierName())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

2
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpMaterialServiceImpl.java

@ -160,6 +160,7 @@ public class ErpMaterialServiceImpl implements IErpMaterialService
{
String loginName = ShiroUtils.getLoginName();
erpMaterial.setCreateBy(loginName);
erpMaterial.setCreateTime(new Date());
int result = erpMaterialMapper.insertErpMaterial(erpMaterial);
Long id = erpMaterial.getId();
String fileIdStr = erpMaterial.getFileIdStr();
@ -194,6 +195,7 @@ public class ErpMaterialServiceImpl implements IErpMaterialService
String fileIdStr = erpMaterial.getFileIdStr();
Long photoAttachId = erpMaterial.getPhotoAttachId();
String removeFileIdStr = erpMaterial.getRemoveFileIdStr();
erpMaterial.setUpdateTime(new Date());
if(StringUtils.isNotBlank(removeFileIdStr)){
List<String> removeFileIdList = Arrays.asList(removeFileIdStr.split(";"));
commonService.deleteByIds(removeFileIdList);

14
ruoyi-admin/src/main/resources/mapper/erp/ErpMaterialMapper.xml

@ -183,9 +183,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyUser != null">apply_user,</if>
<if test="applyTime != null">apply_time,</if>
<if test="supplierId != null">supplier_id,</if>
del_flag,
create_time,
update_time,
<if test="delFlag != null">del_flag,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createBy != null">#{createBy},</if>
@ -216,9 +216,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyUser != null">#{applyUser},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="supplierId != null">#{supplierId},</if>
0,
now(),
now(),
<if test="delFlag != null">#{del_flag},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
@ -255,7 +255,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="supplierId != null">supplier_id = #{supplierId},</if>
update_time = now()
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>

Loading…
Cancel
Save