草稿状态下存储上传人和设备编码
This commit is contained in:
parent
fde308872d
commit
351f6b0154
|
|
@ -328,13 +328,15 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult insertDraft(DevInfo devInfo) {
|
||||
//获取用户信息
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
//保存用户信息
|
||||
devInfo.setCreator(userId).setMaStatus(TO_BE_LISTED.getCode());
|
||||
devInfo.setCreator(userId).setMaStatus(TO_BE_LISTED.getCode()).setOwnId(userId);
|
||||
try {
|
||||
if (devInfo.getMaId() != null) {
|
||||
devInfoMapper.deleteDevInfoByMaId(devInfo.getMaId(), MaStatusEnum.UNDER_RENT.getCode());
|
||||
}
|
||||
String code = getString();
|
||||
devInfo.setCode(code);
|
||||
int insertedDraft = devInfoMapper.insertDraft(devInfo);
|
||||
if (insertedDraft == 0) {
|
||||
return AjaxResult.error("装备草稿保存失败,请修改后重试");
|
||||
|
|
|
|||
|
|
@ -584,6 +584,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="isOperator != null and isOperator != ''">is_operator,</if>
|
||||
is_active,
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="ownId != null and ownId != ''">own_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="deviceName != null and deviceName != ''">#{deviceName},</if>
|
||||
|
|
@ -619,6 +620,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="isOperator != null and isOperator != ''">#{isOperator},</if>
|
||||
1,
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="ownId != null and ownId != ''">#{ownId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue