出库时间修改
This commit is contained in:
parent
0e69f27259
commit
184de4ced1
|
|
@ -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 {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,4 +57,5 @@ public interface LeaseApplyDetailsMapper {
|
|||
List<LeaseOutDetailRecord> getOrderBody(@Param("parentId") String parentId,@Param("typeId") String typeId);
|
||||
|
||||
List<com.bonus.sgzb.material.domain.LeaseApplyDetails> getLeaseApplyDetailsTypeCount(BackApplyInfo bean);
|
||||
|
||||
}
|
||||
|
|
@ -109,4 +109,14 @@ public interface LeaseOutDetailsMapper {
|
|||
LeaseApplyDetails getLeaseApplyDetails(@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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,4 +81,6 @@ public interface LeaseOutDetailsService {
|
|||
TmTask getLeaseOutOrder(String parentId,String typeId);
|
||||
|
||||
int delMachineByRfid(MaMachine maMachine);
|
||||
|
||||
AjaxResult updateOutTime(TmTask bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,6 +160,39 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
|||
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
|
||||
public int delMachineByRfid(MaMachine maMachine) {
|
||||
List<MaMachine> maMachineByMaIdAndMaCode = maMachineMapper.getMaMachineByMaIdAndMaCode(maMachine);
|
||||
|
|
|
|||
|
|
@ -511,4 +511,51 @@
|
|||
parennt_id = #{record.parentId}
|
||||
AND type_id = #{record.typeId}
|
||||
</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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue