Commit 33f026e4 authored by zhangwanglin's avatar zhangwanglin

服务分配

parent b5c0188e
......@@ -23,7 +23,7 @@ public interface ChSrvSendMapper extends BaseMapper<ChSrvSend> {
*/
Page<SvrSendListVo> selectSrvSendList(Page<SvrSendListVo> page, @Param("srvOrganId") Long srvOrganId, @Param("realName") String realName, @Param("realTel") String realTel, @Param("programStatus") String programStatus);
int updateSrvSendInfo(Long disabInfoId);
int updateSrvSendInfo(Long disabInfoId,String programEdnDateStr);
int updateSrvSendById(ChSrvSend chSrvSend);
}
\ No newline at end of file
......@@ -231,11 +231,12 @@ public class SrvTaskServiceImpl implements SrvTaskService {
chSrvProgram.setProgStatus(2);
chSrvProgramMapper.updateById(chSrvProgram);
Long disabInfoId = chSrvProgram.getDisabInfoId();
ChSrvSend chSrvSend = new ChSrvSend();
// chSrvSend.setStatus((short)2);
// chSrvSend.setEndTime(new Date());
chSrvSend.setDisabInfoId(disabInfoId);
chSrvSendMapper.updateSrvSendInfo(disabInfoId);
Date programEdnDate = chSrvProgram.getProgramEdnDate();
String programEdnDateStr = DateUtils.dateToStr(programEdnDate);
int i = chSrvSendMapper.updateSrvSendInfo(disabInfoId, programEdnDateStr);
if(i >0 ){
log.info("服务分配{}终止成功",disabInfoId);
}
}
}
// 查询需要执行的计划
......
......@@ -74,14 +74,14 @@
<update id="updateSrvSendInfo">
update CH_SRV_SEND p set p.status = '2',p.end_time = sysdate where
p.DISAB_INFO_ID = #{disabInfoId}
p.DISAB_INFO_ID = #{disabInfoId} and to_char(p.STOP_TIME,'yyyy-MM-dd') = #{programEdnDateStr}
</update>
<update id="updateSrvSendById" parameterType="com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend">
update CH_SRV_SEND p set p.status = '1',p.SRV_MODE_ID = #{srvModeId},p.ALLOT_TIME =#{allotTime},
p.DISAB_INFO_ID =#{disabInfoId},p.STOP_TIME =#{stopTime},p.fcd = sysdate where
p.SRV_SEND_ID = #{srvSendId}
p.STOP_TIME =#{stopTime},p.SRV_ORGAN_ID = #{srvOrganId}, p.fcd = sysdate where
p.SRV_SEND_ID = #{srvSendId} and p.DISAB_INFO_ID =#{disabInfoId}
</update>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment