|
@@ -82,7 +82,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
private ProcinstService procinstService;
|
|
|
|
|
|
@Autowired
|
|
|
- private CustomerDiningRecordService customerDiningRecordService;
|
|
|
+ private CustomerDiningRecordService customerDiningRecordService;
|
|
|
|
|
|
@Autowired
|
|
|
private ProcessSetService processSetService;
|
|
@@ -161,14 +161,14 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void examineSubmit(String procinstActUserIds, PersonPopedom personPopedom, String status, String content) throws Exception{
|
|
|
+ public void examineSubmit(String procinstActUserIds, PersonPopedom personPopedom, String status, String content) throws Exception {
|
|
|
List<String> idList = Arrays.asList(procinstActUserIds.split(","));
|
|
|
|
|
|
if (idList.size() > 0) {
|
|
|
for (String id : idList) {
|
|
|
ProcinstActUser procinstActUser = get(id);
|
|
|
|
|
|
- log.warn("actUser={},action={}",procinstActUser.getId(),procinstActUser.getAction());
|
|
|
+ log.warn("actUser={},action={}", procinstActUser.getId(), procinstActUser.getAction());
|
|
|
|
|
|
if (procinstActUser != null && "0".equals(procinstActUser.getAction())) {
|
|
|
ProcinstActivity procinstActivity = procinstActivityService.get(procinstActUser.getProcinstActivityId());
|
|
@@ -179,7 +179,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
ProcessTemplate processTemplate = processTemplateService.get(processActivity.getProcessTemplateId());
|
|
|
ProcessSet processSet = processSetService.get(processTemplate.getProcessSetId());
|
|
|
|
|
|
- log.warn("procInstId={},type={}",procinst.getId(),procinst.getType());
|
|
|
+ log.warn("procInstId={},type={}", procinst.getId(), procinst.getType());
|
|
|
|
|
|
String businessStatus = null;
|
|
|
AdjustShift adjustShift = null;
|
|
@@ -222,10 +222,10 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
}
|
|
|
//接待就餐
|
|
|
CustomerDiningRecord customerDiningRecord = null;
|
|
|
- if ("9".equals(procinst.getType())){
|
|
|
- customerDiningRecord = customerDiningRecordService.get(procinst.getBusinessKey());
|
|
|
+ if ("9".equals(procinst.getType())) {
|
|
|
+ customerDiningRecord = customerDiningRecordService.get(procinst.getBusinessKey());
|
|
|
businessStatus = customerDiningRecord.getStatus();
|
|
|
- }
|
|
|
+ }
|
|
|
//年假
|
|
|
YearRequestForLeaveInfo yearRequestForLeaveInfo = null;
|
|
|
if ("11".equals(procinst.getType())) {
|
|
@@ -234,7 +234,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
|
|
|
}
|
|
|
|
|
|
- if (!"0".equals(businessStatus)){
|
|
|
+ if (!"0".equals(businessStatus)) {
|
|
|
throw new Exception("业务非待审核状态");
|
|
|
}
|
|
|
|
|
@@ -242,7 +242,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
List<ProcinstActUser> procinstActUserList = findByProcinstActivityIdActionType(procinstActUser.getProcinstActivityId(), "0", "1");
|
|
|
|
|
|
log.warn("ProcInstActivity={},查询此步骤还有多少人未审核:{},operation={}",
|
|
|
- procinstActUser.getProcinstActivityId(),procinstActUserList.size(),processActivity.getOperation());
|
|
|
+ procinstActUser.getProcinstActivityId(), procinstActUserList.size(), processActivity.getOperation());
|
|
|
|
|
|
//如果未审核人的数量大于1个,则查询此步骤是或签还是会签
|
|
|
if (procinstActUserList.size() > 1) {
|
|
@@ -310,16 +310,16 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
// RequestForLeaveInfo requestForLeaveInfo = requestForLeaveInfoService.get(procinst.getBusinessKey());
|
|
|
|
|
|
//请假审核
|
|
|
- if (requestForLeaveInfo.getStatus() == 0){
|
|
|
+ if (requestForLeaveInfo.getStatus() == 0) {
|
|
|
requestForLeaveInfo.setStatus(1);
|
|
|
double days = 0;
|
|
|
- if(StringUtils.isNotEmpty(requestForLeaveInfo.getDays())) {
|
|
|
+ if (StringUtils.isNotEmpty(requestForLeaveInfo.getDays())) {
|
|
|
days = Double.parseDouble(requestForLeaveInfo.getDays());
|
|
|
}
|
|
|
|
|
|
- if (days>=4){
|
|
|
+ if (days >= 4) {
|
|
|
requestForLeaveInfo.setEnableCancel(true);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
if ("2".equals(requestForLeaveInfo.getLeaveType()) || "5".equals(requestForLeaveInfo.getLeaveType()) || "6".equals(requestForLeaveInfo.getLeaveType())) {
|
|
|
requestForLeaveInfo.setEnableCancel(true);
|
|
|
}
|
|
@@ -329,10 +329,9 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
requestForLeaveInfo.setEnableCancel(true);
|
|
|
}*/
|
|
|
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
//销假审核
|
|
|
- if ("0".equals(requestForLeaveInfo.getCancelStatus())){
|
|
|
+ if ("0".equals(requestForLeaveInfo.getCancelStatus())) {
|
|
|
requestForLeaveInfo.setCancelStatus(status);
|
|
|
requestForLeaveInfo.setCancelTime(new Date());
|
|
|
requestForLeaveInfo.setEnableCancel(false);
|
|
@@ -372,12 +371,12 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
carryThingsOutFactoryService.update(carryThingsOutFactory);
|
|
|
}
|
|
|
|
|
|
- //接口就餐
|
|
|
- if ("9".equals(procinst.getType())) {
|
|
|
- customerDiningRecord.setStatus(status);
|
|
|
- customerDiningRecord.setUpdateTime(new Date());
|
|
|
- customerDiningRecordService.update(customerDiningRecord);
|
|
|
- }
|
|
|
+ //接口就餐
|
|
|
+ if ("9".equals(procinst.getType())) {
|
|
|
+ customerDiningRecord.setStatus(status);
|
|
|
+ customerDiningRecord.setUpdateTime(new Date());
|
|
|
+ customerDiningRecordService.update(customerDiningRecord);
|
|
|
+ }
|
|
|
|
|
|
//年假
|
|
|
if ("11".equals(procinst.getType())) {
|
|
@@ -386,8 +385,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
yearRequestForLeaveInfoService.update(yearRequestForLeaveInfo);
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
log.warn("有下个步骤,修改下个步骤的状态");
|
|
|
procinstActivity1.setStatus("1");
|
|
|
procinstActivityService.update(procinstActivity1);
|
|
@@ -411,7 +409,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
if ("2".equals(procinst.getType())) {
|
|
|
RequestForLeaveInfo requestForLeaveInfo1 = requestForLeaveInfoService.get(procinst.getBusinessKey());
|
|
|
typeName = "请假";
|
|
|
- if (requestForLeaveInfo1.getStatus() == 1 && "0".equals(requestForLeaveInfo1.getCancelStatus())){
|
|
|
+ if (requestForLeaveInfo1.getStatus() == 1 && "0".equals(requestForLeaveInfo1.getCancelStatus())) {
|
|
|
typeName = "销假";
|
|
|
}
|
|
|
|
|
@@ -428,13 +426,13 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
if ("8".equals(procinst.getType())) {
|
|
|
typeName = "携物出厂";
|
|
|
}
|
|
|
- if ("9".equals(procinst.getType())){
|
|
|
- typeName = "接待就餐";
|
|
|
- }
|
|
|
+ if ("9".equals(procinst.getType())) {
|
|
|
+ typeName = "接待就餐";
|
|
|
+ }
|
|
|
if ("11".equals(procinst.getType())) {
|
|
|
typeName = "年假";
|
|
|
}
|
|
|
- WechatMessageUtil.sendEvenMessage(personInfo.getOpenId(), "有一条新的" + typeName + "信息待审核", personInfo.getName(), com.jpsoft.shinestar.modules.common.utils.StringUtils.getApprovalNo(), "前往处理", wxConfig.getPortalUrl() + "xsy/approval/infosp?id=" + procinst.getBusinessKey() + "&procinstActUserId=" + procinstActUser1.getId() + "&formId=" + processSet.getFormId() + "&token=" + accessToken, wxConfig.getAppId(), wxConfig.getAppSecret());
|
|
|
+ WechatMessageUtil.sendEvenMessage(personInfo.getOpenId(), "有一条新的" + typeName + "信息待审核", personInfo.getName(), com.jpsoft.shinestar.modules.common.utils.StringUtils.getApprovalNo(), "前往处理", wxConfig.getPortalUrl() + "xsy/approval/infosp?id=" + procinst.getBusinessKey() + "&procinstActUserId=" + procinstActUser1.getId() + "&formId=" + processSet.getFormId() + "&token=" + accessToken, wxConfig.getAppId(), wxConfig.getAppSecret());
|
|
|
} catch (Exception ex) {
|
|
|
ex.printStackTrace();
|
|
|
}
|
|
@@ -464,7 +462,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
if ("2".equals(procinst.getType())) {
|
|
|
RequestForLeaveInfo requestForLeaveInfo1 = requestForLeaveInfoService.get(procinst.getBusinessKey());
|
|
|
typeName = "请假";
|
|
|
- if (requestForLeaveInfo1.getStatus() == 1 && "0".equals(requestForLeaveInfo1.getCancelStatus())){
|
|
|
+ if (requestForLeaveInfo1.getStatus() == 1 && "0".equals(requestForLeaveInfo1.getCancelStatus())) {
|
|
|
typeName = "销假";
|
|
|
}
|
|
|
PersonPopedom personPopedom1 = personPopedomService.get(requestForLeaveInfo1.getPersonPopedomId());
|
|
@@ -479,7 +477,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
}
|
|
|
if ("4".equals(procinst.getType()) || "5".equals(procinst.getType())) {
|
|
|
typeName = "补卡";
|
|
|
- SupplementWork supplementWork1 = supplementWorkService.get(procinst.getBusinessKey());
|
|
|
+ SupplementWork supplementWork1 = supplementWorkService.get(procinst.getBusinessKey());
|
|
|
PersonPopedom personPopedom1 = personPopedomService.get(supplementWork1.getPersonPopedomId());
|
|
|
personInfo1 = personInfoService.get(personPopedom1.getPersonId());
|
|
|
|
|
@@ -498,7 +496,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
personInfo1 = personInfoService.get(personPopedom1.getPersonId());
|
|
|
|
|
|
}
|
|
|
- if ("9".equals(procinst.getType())){
|
|
|
+ if ("9".equals(procinst.getType())) {
|
|
|
typeName = "接待就餐";
|
|
|
CustomerDiningRecord customerDiningRecord1 = customerDiningRecordService.get(procinst.getBusinessKey());
|
|
|
PersonPopedom personPopedom1 = personPopedomService.get(customerDiningRecord1.getPersonPopedomId());
|
|
@@ -511,13 +509,12 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
PersonPopedom personPopedom1 = personPopedomService.get(yearRequestForLeaveInfo1.getPersonPopedomId());
|
|
|
personInfo1 = personInfoService.get(personPopedom1.getPersonId());
|
|
|
}
|
|
|
- WechatMessageUtil.sendCCRemindMessage(personInfo.getOpenId(), "[抄送]" + typeName +"审核通过", personInfo1.getName(), typeName, typeName+"审核", DateUtil.format(procinst.getCreateTime(),"yyyy-MM-dd HH:mm:ss"),"已抄送",wxConfig.getPortalUrl() + "xsy/approval/infosp?id=" + procinst.getBusinessKey() + "&procinstActUserId=" + ccProcinstActUer.getId() + "&formId=" + processSet.getFormId() + "&token=" + accessToken, wxConfig.getAppId(), wxConfig.getAppSecret());
|
|
|
+ WechatMessageUtil.sendCCRemindMessage(personInfo.getOpenId(), "[抄送]" + typeName + "审核通过", personInfo1.getName(), typeName, typeName + "审核", DateUtil.format(procinst.getCreateTime(), "yyyy-MM-dd HH:mm:ss"), "已抄送", wxConfig.getPortalUrl() + "xsy/approval/infosp?id=" + procinst.getBusinessKey() + "&procinstActUserId=" + ccProcinstActUer.getId() + "&formId=" + processSet.getFormId() + "&token=" + accessToken, wxConfig.getAppId(), wxConfig.getAppSecret());
|
|
|
}
|
|
|
}).start();
|
|
|
|
|
|
}
|
|
|
- }
|
|
|
- else if ("3".equals(status)) {
|
|
|
+ } else if ("3".equals(status)) {
|
|
|
log.warn("审核拒绝,删除其他的或签,删除此申请流程其他未处理的待审核记录");
|
|
|
procinstActUserList.remove(procinstActUser);
|
|
|
procinstActUser.setAction(status);
|
|
@@ -559,12 +556,11 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
//请假
|
|
|
if ("2".equals(procinst.getType())) {
|
|
|
//请假审核
|
|
|
- if (requestForLeaveInfo.getStatus() == 0){
|
|
|
+ if (requestForLeaveInfo.getStatus() == 0) {
|
|
|
requestForLeaveInfo.setStatus(Integer.parseInt(status));
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
//销假审核
|
|
|
- if ("0".equals(requestForLeaveInfo.getCancelStatus())){
|
|
|
+ if ("0".equals(requestForLeaveInfo.getCancelStatus())) {
|
|
|
requestForLeaveInfo.setCancelStatus(status);
|
|
|
requestForLeaveInfo.setCancelTime(new Date());
|
|
|
requestForLeaveInfo.setEnableCancel(true);
|
|
@@ -604,16 +600,16 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
carryThingsOutFactoryService.update(carryThingsOutFactory);
|
|
|
}
|
|
|
|
|
|
- //接待就餐
|
|
|
- if ("9".equals(procinst.getType())) {
|
|
|
- customerDiningRecord.setStatus(status);
|
|
|
- customerDiningRecord.setUpdateTime(new Date());
|
|
|
- customerDiningRecordService.update(customerDiningRecord);
|
|
|
- }
|
|
|
+ //接待就餐
|
|
|
+ if ("9".equals(procinst.getType())) {
|
|
|
+ customerDiningRecord.setStatus(status);
|
|
|
+ customerDiningRecord.setUpdateTime(new Date());
|
|
|
+ customerDiningRecordService.update(customerDiningRecord);
|
|
|
+ }
|
|
|
|
|
|
//年假
|
|
|
if ("11".equals(procinst.getType())) {
|
|
|
- if (yearRequestForLeaveInfo.getStatus() == 0){
|
|
|
+ if (yearRequestForLeaveInfo.getStatus() == 0) {
|
|
|
yearRequestForLeaveInfo.setStatus(Integer.parseInt(status));
|
|
|
}
|
|
|
yearRequestForLeaveInfo.setUpdateTime(new Date());
|
|
@@ -631,7 +627,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
|
|
|
//审核拒绝
|
|
|
if ("3".equals(status)) {
|
|
|
- log.warn("会签审核拒绝,actUserId={}",procinstActUser.getId());
|
|
|
+ log.warn("会签审核拒绝,actUserId={}", procinstActUser.getId());
|
|
|
|
|
|
for (ProcinstActUser procinstActUser1 : procinstActUserList) {
|
|
|
procinstActUser1.setDelFlag(true);
|
|
@@ -665,18 +661,17 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
}
|
|
|
if ("2".equals(procinst.getType())) {
|
|
|
//请假审核
|
|
|
- if (requestForLeaveInfo.getStatus() == 0){
|
|
|
+ if (requestForLeaveInfo.getStatus() == 0) {
|
|
|
requestForLeaveInfo.setStatus(Integer.parseInt(status));
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
//销假审核
|
|
|
- if ("0".equals(requestForLeaveInfo.getCancelStatus())){
|
|
|
+ if ("0".equals(requestForLeaveInfo.getCancelStatus())) {
|
|
|
requestForLeaveInfo.setCancelStatus(status);
|
|
|
requestForLeaveInfo.setCancelTime(new Date());
|
|
|
requestForLeaveInfo.setEnableCancel(true);
|
|
|
}
|
|
|
}
|
|
|
- // requestForLeaveInfo.setStatus(Integer.parseInt(status));
|
|
|
+ // requestForLeaveInfo.setStatus(Integer.parseInt(status));
|
|
|
requestForLeaveInfo.setUpdateTime(new Date());
|
|
|
requestForLeaveInfoService.update(requestForLeaveInfo);
|
|
|
}
|
|
@@ -705,12 +700,12 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
carryThingsOutFactory.setUpdateTime(new Date());
|
|
|
carryThingsOutFactoryService.update(carryThingsOutFactory);
|
|
|
}
|
|
|
- //接待就餐
|
|
|
- if ("9".equals(procinst.getType())) {
|
|
|
- customerDiningRecord.setStatus(status);
|
|
|
- customerDiningRecord.setUpdateTime(new Date());
|
|
|
- customerDiningRecordService.update(customerDiningRecord);
|
|
|
- }
|
|
|
+ //接待就餐
|
|
|
+ if ("9".equals(procinst.getType())) {
|
|
|
+ customerDiningRecord.setStatus(status);
|
|
|
+ customerDiningRecord.setUpdateTime(new Date());
|
|
|
+ customerDiningRecordService.update(customerDiningRecord);
|
|
|
+ }
|
|
|
|
|
|
//年假
|
|
|
if ("11".equals(procinst.getType())) {
|
|
@@ -720,13 +715,12 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
log.warn("未审核人的数量等于1,不用区分或签和会签");
|
|
|
|
|
|
//审核通过
|
|
|
if ("1".equals(status)) {
|
|
|
- log.warn("审核通过,actUserId={}",procinstActUser.getId());
|
|
|
+ log.warn("审核通过,actUserId={}", procinstActUser.getId());
|
|
|
|
|
|
procinstActUser.setAction(status);
|
|
|
procinstActUser.setRemark(content);
|
|
@@ -745,7 +739,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
int activityIndex = procinstActivity.getActivityIndex() + 1;
|
|
|
ProcinstActivity procinstActivity1 = procinstActivityService.findByActivityIndexAndProcinstId(activityIndex, procinstActivity.getProcinstId());
|
|
|
|
|
|
- log.warn("查询是否有下个步骤,procInstId={},activityIndex={},result={}",procinstActivity.getProcinstId(),activityIndex,procinstActivity1!=null);
|
|
|
+ log.warn("查询是否有下个步骤,procInstId={},activityIndex={},result={}", procinstActivity.getProcinstId(), activityIndex, procinstActivity1 != null);
|
|
|
|
|
|
if (procinstActivity1 == null) {
|
|
|
log.warn("没有下个步骤则整个流程完毕");
|
|
@@ -773,7 +767,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
//todo 如果调整当天之前的班次则重新生成考勤
|
|
|
Date now = new Date();
|
|
|
|
|
|
- if(workPersonScheduling.getSchedulingDay()!=null && workPersonScheduling.getSchedulingDay().before(now)) {
|
|
|
+ if (workPersonScheduling.getSchedulingDay() != null && workPersonScheduling.getSchedulingDay().before(now)) {
|
|
|
DateTime startTime = new DateTime(workPersonScheduling.getSchedulingDay());
|
|
|
DateTime endTime = startTime; //updatePersonAttendance会自动加一天
|
|
|
|
|
@@ -792,19 +786,19 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
//请假
|
|
|
if ("2".equals(procinst.getType())) {
|
|
|
//请假审核
|
|
|
- if (requestForLeaveInfo.getStatus() == 0){
|
|
|
+ if (requestForLeaveInfo.getStatus() == 0) {
|
|
|
requestForLeaveInfo.setStatus(Integer.parseInt(status));
|
|
|
// if ("2".equals(requestForLeaveInfo.getLeaveType()) || "5".equals(requestForLeaveInfo.getLeaveType()) || "6".equals(requestForLeaveInfo.getLeaveType())){
|
|
|
// requestForLeaveInfo.setEnableCancel(true)
|
|
|
// }
|
|
|
double days = 0;
|
|
|
- if(StringUtils.isNotEmpty(requestForLeaveInfo.getDays())) {
|
|
|
+ if (StringUtils.isNotEmpty(requestForLeaveInfo.getDays())) {
|
|
|
days = Double.parseDouble(requestForLeaveInfo.getDays());
|
|
|
}
|
|
|
|
|
|
- if (days>=4){
|
|
|
+ if (days >= 4) {
|
|
|
requestForLeaveInfo.setEnableCancel(true);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
if ("2".equals(requestForLeaveInfo.getLeaveType()) || "5".equals(requestForLeaveInfo.getLeaveType()) || "6".equals(requestForLeaveInfo.getLeaveType())) {
|
|
|
requestForLeaveInfo.setEnableCancel(true);
|
|
|
}
|
|
@@ -812,16 +806,15 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
/*if (("1".equals(requestForLeaveInfo.getLeaveType())&&days>=4) ||"2".equals(requestForLeaveInfo.getLeaveType()) || "5".equals(requestForLeaveInfo.getLeaveType()) || "6".equals(requestForLeaveInfo.getLeaveType())){
|
|
|
requestForLeaveInfo.setEnableCancel(true);
|
|
|
}*/
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
//销假审核
|
|
|
- if ("0".equals(requestForLeaveInfo.getCancelStatus())){
|
|
|
+ if ("0".equals(requestForLeaveInfo.getCancelStatus())) {
|
|
|
requestForLeaveInfo.setCancelStatus(status);
|
|
|
requestForLeaveInfo.setCancelTime(new Date());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // requestForLeaveInfo.setStatus(1);
|
|
|
+ // requestForLeaveInfo.setStatus(1);
|
|
|
requestForLeaveInfo.setUpdateTime(new Date());
|
|
|
requestForLeaveInfoService.update(requestForLeaveInfo);
|
|
|
|
|
@@ -854,12 +847,12 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
carryThingsOutFactoryService.update(carryThingsOutFactory);
|
|
|
}
|
|
|
|
|
|
- //接待就餐
|
|
|
- if ("9".equals(procinst.getType())) {
|
|
|
- customerDiningRecord.setStatus(status);
|
|
|
- customerDiningRecord.setUpdateTime(new Date());
|
|
|
- customerDiningRecordService.update(customerDiningRecord);
|
|
|
- }
|
|
|
+ //接待就餐
|
|
|
+ if ("9".equals(procinst.getType())) {
|
|
|
+ customerDiningRecord.setStatus(status);
|
|
|
+ customerDiningRecord.setUpdateTime(new Date());
|
|
|
+ customerDiningRecordService.update(customerDiningRecord);
|
|
|
+ }
|
|
|
|
|
|
//年假
|
|
|
if ("11".equals(procinst.getType())) {
|
|
@@ -867,8 +860,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
yearRequestForLeaveInfo.setUpdateTime(new Date());
|
|
|
yearRequestForLeaveInfoService.update(yearRequestForLeaveInfo);
|
|
|
}
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
log.warn("有下个步骤,修改下个步骤的状态");
|
|
|
|
|
|
procinstActivity1.setStatus("1");
|
|
@@ -890,10 +882,10 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
if ("2".equals(procinst.getType())) {
|
|
|
RequestForLeaveInfo requestForLeaveInfo1 = requestForLeaveInfoService.get(procinst.getBusinessKey());
|
|
|
typeName = "请假";
|
|
|
- if (requestForLeaveInfo1.getStatus() == 1 && "0".equals(requestForLeaveInfo1.getCancelStatus())){
|
|
|
+ if (requestForLeaveInfo1.getStatus() == 1 && "0".equals(requestForLeaveInfo1.getCancelStatus())) {
|
|
|
typeName = "销假";
|
|
|
}
|
|
|
- // typeName = "请假";
|
|
|
+ // typeName = "请假";
|
|
|
}
|
|
|
if ("3".equals(procinst.getType())) {
|
|
|
typeName = "出差";
|
|
@@ -907,10 +899,10 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
if ("8".equals(procinst.getType())) {
|
|
|
typeName = "携物出厂";
|
|
|
}
|
|
|
- if ("9".equals(procinst.getType())){
|
|
|
- typeName = "接待就餐";
|
|
|
- }
|
|
|
- if ("11".equals(procinst.getType())){
|
|
|
+ if ("9".equals(procinst.getType())) {
|
|
|
+ typeName = "接待就餐";
|
|
|
+ }
|
|
|
+ if ("11".equals(procinst.getType())) {
|
|
|
typeName = "年假";
|
|
|
}
|
|
|
WechatMessageUtil.sendEvenMessage(personInfo.getOpenId(), "有一条新的" + typeName + "信息待审核", personInfo.getName(), com.jpsoft.shinestar.modules.common.utils.StringUtils.getApprovalNo(), "前往处理", wxConfig.getPortalUrl() + "xsy/approval/infosp?id=" + procinst.getBusinessKey() + "&procinstActUserId=" + procinstActUser1.getId() + "&formId=" + processSet.getFormId() + "&token=" + accessToken, wxConfig.getAppId(), wxConfig.getAppSecret());
|
|
@@ -943,7 +935,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
if ("2".equals(procinst.getType())) {
|
|
|
RequestForLeaveInfo requestForLeaveInfo1 = requestForLeaveInfoService.get(procinst.getBusinessKey());
|
|
|
typeName = "请假";
|
|
|
- if (requestForLeaveInfo1.getStatus() == 1 && "0".equals(requestForLeaveInfo1.getCancelStatus())){
|
|
|
+ if (requestForLeaveInfo1.getStatus() == 1 && "0".equals(requestForLeaveInfo1.getCancelStatus())) {
|
|
|
typeName = "销假";
|
|
|
}
|
|
|
PersonPopedom personPopedom1 = personPopedomService.get(requestForLeaveInfo1.getPersonPopedomId());
|
|
@@ -977,7 +969,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
personInfo1 = personInfoService.get(personPopedom1.getPersonId());
|
|
|
|
|
|
}
|
|
|
- if ("9".equals(procinst.getType())){
|
|
|
+ if ("9".equals(procinst.getType())) {
|
|
|
typeName = "接待就餐";
|
|
|
CustomerDiningRecord customerDiningRecord1 = customerDiningRecordService.get(procinst.getBusinessKey());
|
|
|
PersonPopedom personPopedom1 = personPopedomService.get(customerDiningRecord1.getPersonPopedomId());
|
|
@@ -990,7 +982,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
PersonPopedom personPopedom1 = personPopedomService.get(yearRequestForLeaveInfo1.getPersonPopedomId());
|
|
|
personInfo1 = personInfoService.get(personPopedom1.getPersonId());
|
|
|
}
|
|
|
- WechatMessageUtil.sendCCRemindMessage(personInfo.getOpenId(), "[抄送]" + typeName +"审核通过", personInfo1.getName(), typeName, typeName+"审核", DateUtil.format(procinst.getCreateTime(),"yyyy-MM-dd HH:mm:ss"),"已抄送",wxConfig.getPortalUrl() + "xsy/approval/info?id=" + procinst.getBusinessKey() + "&formId=" + processSet.getFormId() + "&token=" + accessToken, wxConfig.getAppId(), wxConfig.getAppSecret());
|
|
|
+ WechatMessageUtil.sendCCRemindMessage(personInfo.getOpenId(), "[抄送]" + typeName + "审核通过", personInfo1.getName(), typeName, typeName + "审核", DateUtil.format(procinst.getCreateTime(), "yyyy-MM-dd HH:mm:ss"), "已抄送", wxConfig.getPortalUrl() + "xsy/approval/info?id=" + procinst.getBusinessKey() + "&formId=" + processSet.getFormId() + "&token=" + accessToken, wxConfig.getAppId(), wxConfig.getAppSecret());
|
|
|
}
|
|
|
}).start();
|
|
|
}
|
|
@@ -998,7 +990,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
|
|
|
//审核拒绝
|
|
|
if ("3".equals(status)) {
|
|
|
- log.warn("审核拒绝,actUserId={}",procinstActUser.getId());
|
|
|
+ log.warn("审核拒绝,actUserId={}", procinstActUser.getId());
|
|
|
|
|
|
procinstActUserList.remove(procinstActUser);
|
|
|
procinstActUser.setAction(status);
|
|
@@ -1031,18 +1023,17 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
}
|
|
|
if ("2".equals(procinst.getType())) {
|
|
|
//请假审核
|
|
|
- if (requestForLeaveInfo.getStatus() == 0){
|
|
|
+ if (requestForLeaveInfo.getStatus() == 0) {
|
|
|
requestForLeaveInfo.setStatus(Integer.parseInt(status));
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
//销假审核
|
|
|
- if ("0".equals(requestForLeaveInfo.getCancelStatus())){
|
|
|
+ if ("0".equals(requestForLeaveInfo.getCancelStatus())) {
|
|
|
requestForLeaveInfo.setCancelStatus(status);
|
|
|
requestForLeaveInfo.setCancelTime(new Date());
|
|
|
requestForLeaveInfo.setEnableCancel(true);
|
|
|
}
|
|
|
}
|
|
|
- // requestForLeaveInfo.setStatus(Integer.parseInt(status));
|
|
|
+ // requestForLeaveInfo.setStatus(Integer.parseInt(status));
|
|
|
requestForLeaveInfo.setUpdateTime(new Date());
|
|
|
requestForLeaveInfoService.update(requestForLeaveInfo);
|
|
|
}
|
|
@@ -1075,12 +1066,12 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
carryThingsOutFactoryService.update(carryThingsOutFactory);
|
|
|
}
|
|
|
|
|
|
- //接待就餐
|
|
|
- if ("9".equals(procinst.getType())) {
|
|
|
- customerDiningRecord.setStatus(status);
|
|
|
- customerDiningRecord.setUpdateTime(new Date());
|
|
|
- customerDiningRecordService.update(customerDiningRecord);
|
|
|
- }
|
|
|
+ //接待就餐
|
|
|
+ if ("9".equals(procinst.getType())) {
|
|
|
+ customerDiningRecord.setStatus(status);
|
|
|
+ customerDiningRecord.setUpdateTime(new Date());
|
|
|
+ customerDiningRecordService.update(customerDiningRecord);
|
|
|
+ }
|
|
|
|
|
|
//年假
|
|
|
if ("11".equals(procinst.getType())) {
|
|
@@ -1131,7 +1122,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
new Thread(() -> {
|
|
|
String statusN = "";
|
|
|
String typeNameN = "请假";
|
|
|
- if ("5".equals(requestForLeaveInfo1.getCancelStatus())){
|
|
|
+ if ("5".equals(requestForLeaveInfo1.getCancelStatus())) {
|
|
|
if (requestForLeaveInfo1.getStatus() == 1) {
|
|
|
statusN = "同意";
|
|
|
|
|
@@ -1146,12 +1137,12 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
if (requestForLeaveInfo1.getStatus() == 3) {
|
|
|
statusN = "拒绝";
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
typeNameN = "销假";
|
|
|
- if ("1".equals(requestForLeaveInfo1.getCancelStatus())){
|
|
|
- statusN ="同意";
|
|
|
+ if ("1".equals(requestForLeaveInfo1.getCancelStatus())) {
|
|
|
+ statusN = "同意";
|
|
|
}
|
|
|
- if ("3".equals(requestForLeaveInfo1.getCancelStatus())){
|
|
|
+ if ("3".equals(requestForLeaveInfo1.getCancelStatus())) {
|
|
|
statusN = "拒绝";
|
|
|
}
|
|
|
}
|
|
@@ -1159,7 +1150,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
PersonInfo person = personInfoService.get(requestForLeaveInfo1.getPersonId());
|
|
|
|
|
|
String accessToken = JwtUtil2.createToken(jwtSecret, person.getId() + "", DateTime.now().plusHours(30 * 24).toDate());
|
|
|
- WechatMessageUtil.sendExamine(person.getOpenId(), typeNameN+"审核" + statusN, person.getName(), "1", statusN, typeNameN, "前往查看", wxConfig.getPortalUrl() + "xsy/approval/info?id=" + requestForLeaveInfo1.getId() + "&formId=" + processSet.getFormId() + "&token=" + accessToken, wxConfig.getAppId(), wxConfig.getAppSecret());
|
|
|
+ WechatMessageUtil.sendExamine(person.getOpenId(), typeNameN + "审核" + statusN, person.getName(), "1", statusN, typeNameN, "前往查看", wxConfig.getPortalUrl() + "xsy/approval/info?id=" + requestForLeaveInfo1.getId() + "&formId=" + processSet.getFormId() + "&token=" + accessToken, wxConfig.getAppId(), wxConfig.getAppSecret());
|
|
|
}).start();
|
|
|
}
|
|
|
}
|
|
@@ -1230,7 +1221,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
}
|
|
|
|
|
|
//加班
|
|
|
- if (("6".equals(procinst.getType()) || "7".equals(procinst.getType())) && workOver!=null) {
|
|
|
+ if (("6".equals(procinst.getType()) || "7".equals(procinst.getType())) && workOver != null) {
|
|
|
// WorkOver workOver1 = workOverService.get(procinst.getBusinessKey());
|
|
|
List<WorkOverPerson> workOverPersonList = workOverPersonService.findByWorkOverId(workOver.getId());
|
|
|
if (!"0".equals(workOver.getStatus()) && workOverPersonList.size() > 0) {
|
|
@@ -1248,7 +1239,7 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
workOver.setRemark(statusN);
|
|
|
workOverService.update(workOver);
|
|
|
|
|
|
- log.warn("更新加班记录,workOverId={},remark={}",workOver.getId(),workOver.getRemark());
|
|
|
+ log.warn("更新加班记录,workOverId={},remark={}", workOver.getId(), workOver.getRemark());
|
|
|
|
|
|
final WorkOver fWorkOver = workOver;
|
|
|
final String fStatusN = statusN;
|
|
@@ -1292,48 +1283,48 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //接待就餐
|
|
|
- if ("9".equals(procinst.getType())) {
|
|
|
- CustomerDiningRecord customerDiningRecord1 = customerDiningRecordService.get(procinst.getBusinessKey());
|
|
|
+ //接待就餐
|
|
|
+ if ("9".equals(procinst.getType())) {
|
|
|
+ CustomerDiningRecord customerDiningRecord1 = customerDiningRecordService.get(procinst.getBusinessKey());
|
|
|
|
|
|
- if (!"0".equals(customerDiningRecord1.getStatus())) {
|
|
|
- new Thread(() -> {
|
|
|
- String statusN = "";
|
|
|
- if ("1".equals(customerDiningRecord1.getStatus())) {
|
|
|
- statusN = "同意";
|
|
|
- }
|
|
|
- if ("3".equals(customerDiningRecord1.getStatus())) {
|
|
|
- statusN = "拒绝";
|
|
|
- }
|
|
|
- PersonPopedom personPopedom1 = personPopedomService.findByIdIgnoreDel(customerDiningRecord1.getPersonPopedomId());
|
|
|
+ if (!"0".equals(customerDiningRecord1.getStatus())) {
|
|
|
+ new Thread(() -> {
|
|
|
+ String statusN = "";
|
|
|
+ if ("1".equals(customerDiningRecord1.getStatus())) {
|
|
|
+ statusN = "同意";
|
|
|
+ }
|
|
|
+ if ("3".equals(customerDiningRecord1.getStatus())) {
|
|
|
+ statusN = "拒绝";
|
|
|
+ }
|
|
|
+ PersonPopedom personPopedom1 = personPopedomService.findByIdIgnoreDel(customerDiningRecord1.getPersonPopedomId());
|
|
|
|
|
|
- PersonInfo person = personInfoService.findByIdIgnoreDel(personPopedom1.getPersonId());
|
|
|
+ PersonInfo person = personInfoService.findByIdIgnoreDel(personPopedom1.getPersonId());
|
|
|
|
|
|
- String accessToken = JwtUtil2.createToken(jwtSecret, person.getId() + "", DateTime.now().plusHours(30 * 24).toDate());
|
|
|
- WechatMessageUtil.sendExamine(person.getOpenId(), "接待就餐审核" + statusN, person.getName(), "1", statusN, "接待就餐", "前往查看", wxConfig.getPortalUrl() + "xsy/approval/info?id=" + customerDiningRecord1.getId() + "&formId=" + processSet.getFormId() + "&token=" + accessToken, wxConfig.getAppId(), wxConfig.getAppSecret());
|
|
|
- }).start();
|
|
|
- }
|
|
|
- }
|
|
|
+ String accessToken = JwtUtil2.createToken(jwtSecret, person.getId() + "", DateTime.now().plusHours(30 * 24).toDate());
|
|
|
+ WechatMessageUtil.sendExamine(person.getOpenId(), "接待就餐审核" + statusN, person.getName(), "1", statusN, "接待就餐", "前往查看", wxConfig.getPortalUrl() + "xsy/approval/info?id=" + customerDiningRecord1.getId() + "&formId=" + processSet.getFormId() + "&token=" + accessToken, wxConfig.getAppId(), wxConfig.getAppSecret());
|
|
|
+ }).start();
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
//年假
|
|
|
if ("11".equals(procinst.getType())) {
|
|
|
YearRequestForLeaveInfo yearRequestForLeaveInfo1 = yearRequestForLeaveInfoService.get(procinst.getBusinessKey());
|
|
|
|
|
|
- if (!"0".equals(yearRequestForLeaveInfo1.getStatus())) {
|
|
|
+ if (yearRequestForLeaveInfo1.getStatus() != 0) {
|
|
|
new Thread(() -> {
|
|
|
String statusN = "";
|
|
|
- if ("1".equals(yearRequestForLeaveInfo1.getStatus())) {
|
|
|
+ if (yearRequestForLeaveInfo1.getStatus() == 1) {
|
|
|
statusN = "同意";
|
|
|
|
|
|
try {
|
|
|
- //出差修改人员状态
|
|
|
+ //年假修改人员状态
|
|
|
yearRequestForLeaveInfoService.logic(yearRequestForLeaveInfo1);
|
|
|
} catch (Exception ex) {
|
|
|
ex.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
- if ("3".equals(yearRequestForLeaveInfo1.getStatus())) {
|
|
|
+ if (yearRequestForLeaveInfo1.getStatus() == 3) {
|
|
|
statusN = "拒绝";
|
|
|
}
|
|
|
|
|
@@ -1361,8 +1352,8 @@ public class ProcinstActUserServiceImpl implements ProcinstActUserService {
|
|
|
for (SupplementWorkPerson supplementWorkPerson : supplementWorkPersonList) {
|
|
|
WorkScheduleAttendance workScheduleAttendance = workScheduleAttendanceService.get(supplementWorkPerson.getScheduleAttendanceId());
|
|
|
|
|
|
- if(workScheduleAttendance.getDelFlag()==null || workScheduleAttendance.getDelFlag()){
|
|
|
- workScheduleAttendance = workScheduleAttendanceService.findByScheduleAttendanceId(workScheduleAttendance.getPersonScheduleId(),workScheduleAttendance.getWorkShiftId(),workScheduleAttendance.getClassify());
|
|
|
+ if (workScheduleAttendance.getDelFlag() == null || workScheduleAttendance.getDelFlag()) {
|
|
|
+ workScheduleAttendance = workScheduleAttendanceService.findByScheduleAttendanceId(workScheduleAttendance.getPersonScheduleId(), workScheduleAttendance.getWorkShiftId(), workScheduleAttendance.getClassify());
|
|
|
|
|
|
if (workScheduleAttendance != null) {
|
|
|
supplementWorkPerson.setScheduleAttendanceId(workScheduleAttendance.getId());
|