@@ -20,7 +20,7 @@ public interface ZfdServiceApplyRepo extends AbstractJpaRepo<ZfdServiceApply, St | |||
public ZfdServiceApply findByAllId(String id); | |||
@Query(nativeQuery=true,value="select * from zfd_service_apply where AUDIT_TIME<=?1") | |||
@Query(nativeQuery=true,value="select * from zfd_service_apply where AUDIT_TIME<=?1 and STATUS ='PASSED'") | |||
public List<ZfdServiceApply> listByApplyAuditTime(LocalDateTime auditTime); | |||
@@ -31,13 +31,13 @@ public interface ServiceRequestInquiryManager { | |||
* @param zfdServiceApply | |||
* @throws ManagerException | |||
*/ | |||
void update(@Valid ZfdServiceApply zfdServiceApply,User user) throws ManagerException; | |||
void approval(@Valid ZfdServiceApply zfdServiceApply,User user) throws ManagerException; | |||
/** | |||
* 服务结束 | |||
* @param zfdServiceApply | |||
*/ | |||
void updateFinish(@Valid ZfdServiceApply zfdServiceApply); | |||
void serviceFinish(@Valid ZfdServiceApply zfdServiceApply); | |||
List<ZfdServiceApply> findAll(); |
@@ -63,7 +63,7 @@ public class ServiceRequestInquiryManagerImpl extends AbstractManager implements | |||
*/ | |||
@Transactional | |||
@Override | |||
public void update(@Valid ZfdServiceApply zfdServiceApply,User user) throws ManagerException { | |||
public void approval(@Valid ZfdServiceApply zfdServiceApply,User user) throws ManagerException { | |||
//业务校验 | |||
ZfdServiceApply applyInDb = zfdServiceApplyRepo.findByAllId(zfdServiceApply.getId()); | |||
if(applyInDb == null) throw new ManagerException("未找到该申请,申请编号:"+ zfdServiceApply.getId()); | |||
@@ -203,7 +203,7 @@ public class ServiceRequestInquiryManagerImpl extends AbstractManager implements | |||
*/ | |||
@Transactional | |||
@Override | |||
public void updateFinish(@Valid ZfdServiceApply zfdServiceApply) { | |||
public void serviceFinish(@Valid ZfdServiceApply zfdServiceApply) { | |||
ZfdServiceApply zfdServiceApplys = zfdServiceApplyRepo.findByAllId(zfdServiceApply.getId()); | |||
//将从库里面查询的值进行非空校验 | |||
if(zfdServiceApplys !=null){ |
@@ -30,7 +30,7 @@ public class CronPara extends AbstractSysConf | |||
private String ssoTicket = "24 1/6 * * * ?"; | |||
private String test = "1/5 * * * * ?"; | |||
private String test2 = "0/5 * * * * ?"; | |||
private String zfdServiceApply = "* * * 1/1 * ?";//每天跑一次 | |||
private String zfdServiceApply = "0 0 2 * * ?";//每天2点触发 | |||
public String getZfdServiceApply() { | |||
return zfdServiceApply; |
@@ -116,7 +116,7 @@ public class ServiceRequestInquiryController extends BaseLogController{ | |||
HttpServletResponse response) throws IOException, ManagerException | |||
{ | |||
logger.info(zfdServiceApply.toJson()); | |||
serviceRequestInquiryManager.update(zfdServiceApply,LoginHelper.getLoginUser(request)); | |||
serviceRequestInquiryManager.approval(zfdServiceApply,LoginHelper.getLoginUser(request)); | |||
model.addAttribute("model", zfdServiceApply); | |||
addSuccess(response, "审批完成!"); | |||
addLog(request, LogType.SERVICE_APPROVAL, "用户({})审批{}完成", LoginHelper.getLoginUser(request).getName(),zfdServiceApply.getId()); | |||
@@ -151,7 +151,7 @@ public class ServiceRequestInquiryController extends BaseLogController{ | |||
public String processFinish(@Valid @ModelAttribute("pageModel") ZfdServiceApply zfdServiceApply, Model model,HttpServletRequest request, | |||
HttpServletResponse response) throws IOException, ManagerException | |||
{ | |||
serviceRequestInquiryManager.updateFinish(zfdServiceApply); | |||
serviceRequestInquiryManager.serviceFinish(zfdServiceApply); | |||
model.addAttribute("model", zfdServiceApply); | |||
addSuccess(response, "服务结束!"); | |||
addLog(request, LogType.END_OF_SERVICE, "用户({})服务结束", LoginHelper.getLoginUser(request).getName(),zfdServiceApply.getId()); |
@@ -3,7 +3,7 @@ | |||
<tr> | |||
<td> | |||
${fn:escapeXml(vo.id)} | |||
${fn:escapeXml(voStatus.count)} | |||
</td> | |||
<td> | |||
${fn:escapeXml(vo.vehiclePalte) }_${fn:escapeXml(vo.vehiclePlatecolor.value) } |