Merge branch 'dev' into 1122-动火台账

cmt1.0
zhaoyu 2023-11-22 16:33:18 +08:00
commit 86e10c7966
5 changed files with 73 additions and 1 deletions

View File

@ -85,8 +85,9 @@ public class AppKeyprojectCheckController extends BaseController {
time = DateUtil.calculateDateSecond(time, 1); time = DateUtil.calculateDateSecond(time, 1);
} }
} }
Boolean boo = false; // 增加开关控制
if (Tools.notEmpty(pd.getString("HIDDENJSON"))) { if (Tools.notEmpty(pd.getString("HIDDENJSON"))) {
boo = true;
List<PageData> hiddenList = new ArrayList<PageData>(); List<PageData> hiddenList = new ArrayList<PageData>();
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("HIDDENJSON")); List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("HIDDENJSON"));
String time = currentTime; String time = currentTime;
@ -142,6 +143,32 @@ public class AppKeyprojectCheckController extends BaseController {
records = SendSmsUtil.getRecords(person.getString("PHONENUM"),tpContent); records = SendSmsUtil.getRecords(person.getString("PHONENUM"),tpContent);
jsonArray.add(records); jsonArray.add(records);
SendSmsUtil.sendSms("121451",jsonArray,null); SendSmsUtil.sendSms("121451",jsonArray,null);
//发送罚款待处理 上文开关控制这里发送不
if(boo){
List<JSONObject> jsonList = (List<JSONObject>) JSON.parse(pd.getString("HIDDENJSON"));
String PUNISHTHEPERSON = keyprojectHiddenService.getPUNISHTHEPERSON(pd);
if (!Tools.isEmpty(PUNISHTHEPERSON)) {
PageData selectPageData = new PageData();
String[] split = PUNISHTHEPERSON.split(",");
selectPageData.put("ids", split);
List<String> list = keyprojectHiddenService.getPhone(selectPageData);
for (JSONObject json : jsonList) {
for(String phone:list) {
JSONArray jsonBrray = new JSONArray();
//接受返回结果
JSONObject recordsB = new JSONObject();
//定义替换参数
JSONObject tpContentB = new JSONObject();
tpContentB.put("HIDDENDESCR",json.getString("HIDDENDESCR")); //隐患描述
if(StringUtils.isNotBlank(phone)){
recordsB = SendSmsUtil.getRecords(phone,tpContentB);
jsonBrray.add(recordsB);
SendSmsUtil.sendSms("121487",jsonBrray,null);
}
}
}
}
}
} }
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();

View File

@ -158,5 +158,14 @@ public interface KeyprojectHiddenMapper {
*/ */
List<PageData> getpunishlistPage(Page page); List<PageData> getpunishlistPage(Page page);
/**
*
* @param pd
* @return
*/
String getPUNISHTHEPERSON(PageData pd);
List<String> getPhone(PageData pd);
} }

View File

@ -180,5 +180,14 @@ public interface KeyprojectHiddenService {
public PageData keyprojectcount(PageData pd)throws Exception; public PageData keyprojectcount(PageData pd)throws Exception;
List<PageData> getpunishlist(Page page); List<PageData> getpunishlist(Page page);
/**
*
* @param pd
* @return
*/
String getPUNISHTHEPERSON(PageData pd);
List<String> getPhone(PageData pd);
} }

View File

@ -253,5 +253,15 @@ public class KeyprojectHiddenServiceImpl implements KeyprojectHiddenService {
public List<PageData> getpunishlist(Page page) { public List<PageData> getpunishlist(Page page) {
return hiddenMapper.getpunishlistPage(page); return hiddenMapper.getpunishlistPage(page);
} }
@Override
public String getPUNISHTHEPERSON(PageData pd) {
return hiddenMapper.getPUNISHTHEPERSON(pd);
}
@Override
public List<String> getPhone(PageData pd) {
return hiddenMapper.getPhone(pd);
}
} }

View File

@ -1606,4 +1606,21 @@
h.ISPUNISH ASC, h.ISPUNISH ASC,
p.HANDLED DESC p.HANDLED DESC
</select> </select>
<select id="getPUNISHTHEPERSON" parameterType="pd" resultType="string">
SELECT gc.PUNISH_THE_PERSON PUNISH_THE_PERSON FROM `qa-gwj-regulatory`.BUS_OUTSOURCED gc
WHERE gc.OUTSOURCED_ID=#{OUTSOURCED_ID}
AND gc.IS_SMS = '0'
</select>
<select id="getPhone" parameterType="pd" resultType="string">
SELECT
IFNULL(PHONE,USERNAME) PHONE FROM vi_user_all WHERE
<if test="ids!= null and ids.length>0">
USER_ID IN
<foreach item="item" index="index" collection="ids" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
</mapper> </mapper>