Merge branch 'dev' into 1122-动火台账
commit
86e10c7966
|
@ -85,8 +85,9 @@ public class AppKeyprojectCheckController extends BaseController {
|
|||
time = DateUtil.calculateDateSecond(time, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Boolean boo = false; // 增加开关控制
|
||||
if (Tools.notEmpty(pd.getString("HIDDENJSON"))) {
|
||||
boo = true;
|
||||
List<PageData> hiddenList = new ArrayList<PageData>();
|
||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("HIDDENJSON"));
|
||||
String time = currentTime;
|
||||
|
@ -142,6 +143,32 @@ public class AppKeyprojectCheckController extends BaseController {
|
|||
records = SendSmsUtil.getRecords(person.getString("PHONENUM"),tpContent);
|
||||
jsonArray.add(records);
|
||||
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){
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -158,5 +158,14 @@ public interface KeyprojectHiddenMapper {
|
|||
*/
|
||||
List<PageData> getpunishlistPage(Page page);
|
||||
|
||||
/**
|
||||
* 获取当前隐患的处罚人
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
String getPUNISHTHEPERSON(PageData pd);
|
||||
|
||||
|
||||
List<String> getPhone(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -180,5 +180,14 @@ public interface KeyprojectHiddenService {
|
|||
public PageData keyprojectcount(PageData pd)throws Exception;
|
||||
|
||||
List<PageData> getpunishlist(Page page);
|
||||
|
||||
/**
|
||||
* 获取当前隐患的处罚人
|
||||
* @param pd
|
||||
* @return
|
||||
*/
|
||||
String getPUNISHTHEPERSON(PageData pd);
|
||||
|
||||
List<String> getPhone(PageData pd);
|
||||
}
|
||||
|
||||
|
|
|
@ -253,5 +253,15 @@ public class KeyprojectHiddenServiceImpl implements KeyprojectHiddenService {
|
|||
public List<PageData> getpunishlist(Page 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1606,4 +1606,21 @@
|
|||
h.ISPUNISH ASC,
|
||||
p.HANDLED DESC
|
||||
</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>
|
||||
|
|
Loading…
Reference in New Issue