|
|
@@ -9,6 +9,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
@@ -107,6 +108,10 @@ public class StockLandService extends BaseService<StockLand> {
|
|
|
@Autowired
|
|
|
private WaitToDoService waitToDoService;
|
|
|
|
|
|
+ // 默认wei.pp的电话号码
|
|
|
+ @Value("${company-master-phone:18362602202}")
|
|
|
+ private String companyMasterPhone;
|
|
|
+
|
|
|
@Transactional(readOnly = true)
|
|
|
public PageInfo<StockLand> findPage(Integer pageNum, Integer pageSize, String param,StockLand searchCondition) throws Exception {
|
|
|
Example example = new Example(StockLand.class);
|
|
|
@@ -848,6 +853,15 @@ public class StockLandService extends BaseService<StockLand> {
|
|
|
JSONObject.toJSONString(params)
|
|
|
);
|
|
|
}
|
|
|
+ // wangjiang@2022-10-09 20:54:48 发送给魏培培通知所有审查通过
|
|
|
+ if (isNeedNoticeAfterDispatch(stockLand.getApply_type())) {
|
|
|
+ AlibabaSMSUtil.sendSMS(
|
|
|
+ companyMasterPhone,
|
|
|
+ Constant.SMS_TemplateCode.STOCKLAND_JUDGE_FINISH_DISPATCH,
|
|
|
+ Constant.SINGNAMW,
|
|
|
+ JSONObject.toJSONString(params)
|
|
|
+ );
|
|
|
+ }
|
|
|
} catch (ClientException | InterruptedException e) {
|
|
|
// throw new BaseException("短信接口异常!发送短信失败!");
|
|
|
}
|
|
|
@@ -936,6 +950,7 @@ public class StockLandService extends BaseService<StockLand> {
|
|
|
//}
|
|
|
StringBuffer sb = new StringBuffer("");
|
|
|
if(StringUtils.isNotBlank(departmentIds)){
|
|
|
+ List<User> nextChecker = new ArrayList<>();
|
|
|
String departmentIdArr [] = departmentIds.split(",");
|
|
|
String handler = "";//待办操作人,待办先发送经办人
|
|
|
for(String departId:departmentIdArr){
|
|
|
@@ -952,10 +967,32 @@ public class StockLandService extends BaseService<StockLand> {
|
|
|
}
|
|
|
for(User user:userList){
|
|
|
sb.append(user.getId()+",");
|
|
|
+ nextChecker.add(user);
|
|
|
}
|
|
|
handler += getFirstLevelChecker(userList);
|
|
|
}
|
|
|
saveApprovalAndUpdateAttach(slad, id, comment, sb.toString(),Constant.LandApproveStatus.COMPLIANCE_AUDIT,Constant.OperType.APPROVED,approval_round);
|
|
|
+ // wangjiang@2022-10-09 20:31:40 添加发送人短信通知
|
|
|
+// if (!nextChecker.isEmpty() && isNeedNoticeAfterDispatch(stockLand.getApply_type())) {
|
|
|
+// String tempCode = Constant.SMS_TemplateCode.STOCKLAND_JUDGE_AFTER_DISPATCH;
|
|
|
+// Map<String, String> params = new HashMap<>();
|
|
|
+// params.put("applyno", stockLand.getApply_no());
|
|
|
+// for (User user : nextChecker) {
|
|
|
+// try {
|
|
|
+// AlibabaSMSUtil.sendSMS(
|
|
|
+// user.getPhone(),
|
|
|
+// tempCode,
|
|
|
+// Constant.SINGNAMW,
|
|
|
+// JSONObject.toJSONString(params)
|
|
|
+// );
|
|
|
+// } catch (ClientException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// } catch (InterruptedException e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
//新增待办
|
|
|
//String handler = getFirstLevelChecker(userList);
|
|
|
waitToDoService.newTODO("存量用地审核", "/areaManager/approval?id=" + stockLand.getId(), Constant.WaitToDo_OperType.AUDIT, stockLand.getId(),
|
|
|
@@ -1119,6 +1156,20 @@ public class StockLandService extends BaseService<StockLand> {
|
|
|
return ResponseMessage.success("审核成功!");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 是否需要在分发后进行短信通知
|
|
|
+ *
|
|
|
+ * @author wangjiang
|
|
|
+ * @date 2022-10-09 20:41:54
|
|
|
+ **/
|
|
|
+ public boolean isNeedNoticeAfterDispatch(String apply_type) {
|
|
|
+ if (Objects.equals(apply_type, Constant.LandApplyType.USE_CHANGE) ||
|
|
|
+ Objects.equals(apply_type, Constant.LandApplyType.EQUITY_STRUCTURE_CHANGE) ||
|
|
|
+ Objects.equals(apply_type, Constant.LandApplyType.IMMOVABLES_CHANGE)
|
|
|
+ ) return true;
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
private void doReject(StockLandApprovalDto slad, int id, String comment, StockLand stockLand, Integer approval_round, String reject, String operaType) {
|
|
|
//将状态设为“退回”
|
|
|
stockLand.setApprove_status(reject);
|