出库时间修改

This commit is contained in:
hongchao 2025-03-27 19:05:11 +08:00
parent 0e69f27259
commit 184de4ced1
6 changed files with 106 additions and 0 deletions

View File

@ -185,6 +185,17 @@ public class LeaseOutDetailsController extends BaseController {
} }
} }
/**
* 出库单修改出库时间
*
* @param bean
*/
@Log(title = "出库单修改出库时间", businessType = BusinessType.UPDATE)
@PostMapping("/updateOutTime")
public AjaxResult updateOutTime(@RequestBody TmTask bean) {
return leaseOutDetailsService.updateOutTime(bean);
}
/** /**
* 综合查询--领用记录查询 * 综合查询--领用记录查询
* *
@ -217,4 +228,6 @@ public class LeaseOutDetailsController extends BaseController {
} }
} }
} }

View File

@ -57,4 +57,5 @@ public interface LeaseApplyDetailsMapper {
List<LeaseOutDetailRecord> getOrderBody(@Param("parentId") String parentId,@Param("typeId") String typeId); List<LeaseOutDetailRecord> getOrderBody(@Param("parentId") String parentId,@Param("typeId") String typeId);
List<com.bonus.sgzb.material.domain.LeaseApplyDetails> getLeaseApplyDetailsTypeCount(BackApplyInfo bean); List<com.bonus.sgzb.material.domain.LeaseApplyDetails> getLeaseApplyDetailsTypeCount(BackApplyInfo bean);
} }

View File

@ -109,4 +109,14 @@ public interface LeaseOutDetailsMapper {
LeaseApplyDetails getLeaseApplyDetails(@Param("record") LeaseOutDetails record); LeaseApplyDetails getLeaseApplyDetails(@Param("record") LeaseOutDetails record);
int updateLeaseApplyDetails(@Param("record") LeaseOutDetails record); int updateLeaseApplyDetails(@Param("record") LeaseOutDetails record);
int updateOutTimeTmTask(TmTask bean);
List<TmTask> getDetail(TmTask bean);
int updateOutTimeDetails(TmTask bean);
List<TmTask> getSlt(TmTask bean);
int updateOutTimeSlt(TmTask bean);
} }

View File

@ -81,4 +81,6 @@ public interface LeaseOutDetailsService {
TmTask getLeaseOutOrder(String parentId,String typeId); TmTask getLeaseOutOrder(String parentId,String typeId);
int delMachineByRfid(MaMachine maMachine); int delMachineByRfid(MaMachine maMachine);
AjaxResult updateOutTime(TmTask bean);
} }

View File

@ -160,6 +160,39 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
return orderHead; return orderHead;
} }
@Override
@Transactional
public AjaxResult updateOutTime(TmTask bean) {
try {
//修改tm_task表的出库时间
int i = leaseOutDetailsMapper.updateOutTimeTmTask(bean);
if (i == 0) {
return AjaxResult.error("出库时间修改失败");
}
List<TmTask> detailList = leaseOutDetailsMapper.getDetail(bean);
if(!detailList.isEmpty()){
int j = leaseOutDetailsMapper.updateOutTimeDetails(bean);
if (j == 0) {
return AjaxResult.error("出库时间修改失败");
}
}
List<TmTask> sltList = leaseOutDetailsMapper.getSlt(bean);
if(!sltList.isEmpty()){
int k = leaseOutDetailsMapper.updateOutTimeSlt(bean);
if (k == 0) {
return AjaxResult.error("出库时间修改失败");
}
}
} catch (Exception e) {
log.error("出库时间修改成功", e.getMessage());
throw new RuntimeException("出库时间修改成功");
}
return AjaxResult.success("出库时间修改成功");
}
@Override @Override
public int delMachineByRfid(MaMachine maMachine) { public int delMachineByRfid(MaMachine maMachine) {
List<MaMachine> maMachineByMaIdAndMaCode = maMachineMapper.getMaMachineByMaIdAndMaCode(maMachine); List<MaMachine> maMachineByMaIdAndMaCode = maMachineMapper.getMaMachineByMaIdAndMaCode(maMachine);

View File

@ -511,4 +511,51 @@
parennt_id = #{record.parentId} parennt_id = #{record.parentId}
AND type_id = #{record.typeId} AND type_id = #{record.typeId}
</select> </select>
<update id="updateOutTimeTmTask">
UPDATE
tm_task
SET
update_time = #{updateTime}
WHERE
task_id = #{taskId}
</update>
<select id="getDetail" resultType="com.bonus.sgzb.app.domain.TmTask">
SELECT
id AS id
FROM
lease_out_details
WHERE
parent_id = #{id}
</select>
<update id="updateOutTimeDetails">
UPDATE
lease_out_details
SET
create_time = #{updateTime}
WHERE
parent_id = #{id}
</update>
<select id="getSlt" resultType="com.bonus.sgzb.app.domain.TmTask">
SELECT
id AS id
FROM
slt_agreement_info
WHERE
lease_id = #{id}
</select>
<update id="updateOutTimeSlt">
UPDATE
slt_agreement_info
SET
start_time = #{updateTime}
WHERE
lease_id = #{id}
</update>
</mapper> </mapper>