材料站领料记录添加备注
This commit is contained in:
parent
7c31ac223b
commit
0c1228234b
|
|
@ -66,6 +66,24 @@ public class MaterialLeaseInfoController extends BaseController {
|
|||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料任务添加备注
|
||||
* @param leaseApplyInfo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "新增领料任务")
|
||||
@PreventRepeatSubmit
|
||||
@SysLog(title = "领料任务", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增领料任务")
|
||||
@PostMapping("/addRemark")
|
||||
public AjaxResult addRemark(@NotNull(message = "领料任务不能为空") @RequestBody MaterialLeaseApplyInfo leaseApplyInfo) {
|
||||
try {
|
||||
return materialLeaseInfoService.updateLeaseRemark(leaseApplyInfo);
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询总站点领料详情数据
|
||||
* @param leaseApplyInfo
|
||||
|
|
|
|||
|
|
@ -392,4 +392,8 @@ public interface MaterialLeaseInfoMapper {
|
|||
* @return
|
||||
*/
|
||||
List<MaterialLeaseApplyInfo> getSltInfoList(Long id);
|
||||
|
||||
void updateLeaseRemarkLY(MaterialLeaseApplyInfo leaseApplyInfo);
|
||||
|
||||
void updateLeaseRemarkLL(MaterialLeaseApplyInfo leaseApplyInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,4 +158,6 @@ public interface MaterialLeaseInfoService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult getInfoByCode(BmQrcodeInfo bmQrcodeInfo);
|
||||
|
||||
AjaxResult updateLeaseRemark(MaterialLeaseApplyInfo leaseApplyInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -329,6 +329,30 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
|||
return allowedRoles.stream().anyMatch(userRoles::contains);
|
||||
}
|
||||
|
||||
/**
|
||||
* 领料任务添加备注
|
||||
*
|
||||
* @param leaseApplyInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult updateLeaseRemark(MaterialLeaseApplyInfo leaseApplyInfo) {
|
||||
try {
|
||||
|
||||
if(leaseApplyInfo.getPublishTask()!=null && !leaseApplyInfo.getPublishTask().isEmpty()){
|
||||
//领用修改备注
|
||||
materialLeaseInfoMapper.updateLeaseRemarkLY(leaseApplyInfo);
|
||||
}else{
|
||||
//领料修改备注
|
||||
materialLeaseInfoMapper.updateLeaseRemarkLL(leaseApplyInfo);
|
||||
}
|
||||
return AjaxResult.success();
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("添加备注失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询总站点领料详情数据
|
||||
*
|
||||
|
|
|
|||
|
|
@ -373,6 +373,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
parent_id = #{record.parentId} and type_id = #{record.typeId}
|
||||
</update>
|
||||
|
||||
<update id="updateLeaseRemarkLY">
|
||||
update lease_publish_details
|
||||
set remark = #{remark}
|
||||
where parent_id = #{id} and publish_task = #{publishTask}
|
||||
</update>
|
||||
|
||||
<update id="updateLeaseRemarkLL">
|
||||
update lease_apply_info
|
||||
set remark = #{remark}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteLeaseApplyDetailsByParentIds">
|
||||
delete from clz_lease_apply_details where parent_id = #{id}
|
||||
</delete>
|
||||
|
|
@ -453,7 +465,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
tt.task_type as taskType,
|
||||
bp.external_id AS externalId,
|
||||
bu.bzz_idcard AS idCard,
|
||||
bp.imp_unit AS impUnit
|
||||
bp.imp_unit AS impUnit,
|
||||
lai.remark as remark
|
||||
from
|
||||
lease_apply_info lai
|
||||
left join tm_task tt on lai.task_id = tt.task_id
|
||||
|
|
@ -1099,7 +1112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
tt.task_type AS taskType,
|
||||
bp.external_id AS externalId,
|
||||
bu.bzz_idcard AS idCard,
|
||||
bp.imp_unit AS impUnit
|
||||
bp.imp_unit AS impUnit,
|
||||
lpd.remark as remark
|
||||
FROM
|
||||
lease_publish_details lpd
|
||||
LEFT JOIN lease_apply_info lai ON lai.id = lpd.parent_id
|
||||
|
|
|
|||
Loading…
Reference in New Issue