兴安优化提交
This commit is contained in:
@@ -20,10 +20,12 @@ import com.dcsoft.common.log.annotation.Log;
|
|||||||
import com.dcsoft.common.log.enums.BusinessType;
|
import com.dcsoft.common.log.enums.BusinessType;
|
||||||
import com.dcsoft.common.redis.service.RedisService;
|
import com.dcsoft.common.redis.service.RedisService;
|
||||||
import com.dcsoft.common.security.annotation.RequiresPermissions;
|
import com.dcsoft.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.dcsoft.common.security.utils.SecurityUtils;
|
||||||
import com.dcsoft.common.sms.config.properties.SmsProperties;
|
import com.dcsoft.common.sms.config.properties.SmsProperties;
|
||||||
import com.dcsoft.system.api.RemoteFileService;
|
import com.dcsoft.system.api.RemoteFileService;
|
||||||
import com.dcsoft.system.api.domain.SysFile;
|
import com.dcsoft.system.api.domain.SysFile;
|
||||||
import com.dcsoft.system.api.domain.SysUser;
|
import com.dcsoft.system.api.domain.SysUser;
|
||||||
|
import com.dcsoft.system.api.model.LoginUser;
|
||||||
import com.dcsoft.system.domain.SysPeople;
|
import com.dcsoft.system.domain.SysPeople;
|
||||||
import com.dcsoft.system.domain.vo.IdNamelVo;
|
import com.dcsoft.system.domain.vo.IdNamelVo;
|
||||||
import com.dcsoft.system.service.ISysDictDataService;
|
import com.dcsoft.system.service.ISysDictDataService;
|
||||||
@@ -101,6 +103,9 @@ public class VisCarryStuffController extends BaseController {
|
|||||||
@Value("${sms.parkName:'兴安智慧园区'}")
|
@Value("${sms.parkName:'兴安智慧园区'}")
|
||||||
private String parkName;
|
private String parkName;
|
||||||
|
|
||||||
|
@Value("${app.deptId:228}")
|
||||||
|
private String appDeptId;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RemoteFileService remoteFileService;
|
private RemoteFileService remoteFileService;
|
||||||
|
|
||||||
@@ -148,6 +153,54 @@ public class VisCarryStuffController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/appList")
|
||||||
|
public TableDataInfo appList(VisExitOutVo vo) {
|
||||||
|
startPage();
|
||||||
|
if (!StringUtils.equals(appDeptId, vo.getAppDeptId())) {
|
||||||
|
LoginUser user = SecurityUtils.getLoginUser();
|
||||||
|
vo.setCreateBy(user.getUsername());
|
||||||
|
}
|
||||||
|
List<VisExitOutVo> list = visCarryStuffService.selectList(vo);
|
||||||
|
if (CollUtil.isEmpty(list)) {
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询物品信息列表
|
||||||
|
List<Long> collect = list.stream().map(VisExitOutVo::getId).collect(Collectors.toList());
|
||||||
|
VisStuffInfoVo visStuffInfoVo = new VisStuffInfoVo();
|
||||||
|
visStuffInfoVo.setExitIds(collect);
|
||||||
|
List<VisStuffInfoVo> stuffList = visCarryStuffService.selectStuffList(visStuffInfoVo);
|
||||||
|
if (CollUtil.isEmpty(stuffList)) {
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
//处理字典值
|
||||||
|
Map<String, String> map = dictDataService.queryDictData("vis_out_stuff_type");
|
||||||
|
stuffList.forEach(stuff -> {
|
||||||
|
if (StrUtil.isNotBlank(stuff.getType())) {
|
||||||
|
stuff.setTypeName(map.get(stuff.getType()));
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(stuff.getBackType())) {
|
||||||
|
stuff.setBackTypeName(map.get(stuff.getBackType()));
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(stuff.getImgUrls())) {
|
||||||
|
stuff.setImgUrlList(Arrays.asList(stuff.getImgUrls().split(",")));
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(stuff.getBackImgUrls())) {
|
||||||
|
stuff.setBackImgUrlList(Arrays.asList(stuff.getBackImgUrls().split(",")));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//构造数据
|
||||||
|
Map<Long, List<VisStuffInfoVo>> collect1 = stuffList.stream().collect(Collectors.groupingBy(VisStuffInfoVo::getExitId));
|
||||||
|
list.forEach(exit -> {
|
||||||
|
exit.setVisStuffInfoList(collect1.get(exit.getId()));
|
||||||
|
});
|
||||||
|
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取携物信息详细信息(详情)
|
* 获取携物信息详细信息(详情)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -833,7 +833,7 @@ public class VisitorController extends BaseController {
|
|||||||
.execute()
|
.execute()
|
||||||
.body();
|
.body();
|
||||||
JSONObject object = JSON.parseObject(body);
|
JSONObject object = JSON.parseObject(body);
|
||||||
log.info("企微消息发送结果:{}", body);
|
log.info("企微消息发送:{}结果:{}", phone, body);
|
||||||
if(!Constants.ZERO.equals(object.get("errcode").toString())) {
|
if(!Constants.ZERO.equals(object.get("errcode").toString())) {
|
||||||
log.error("企微消息发送失败" + object.get("errcode").toString());
|
log.error("企微消息发送失败" + object.get("errcode").toString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -161,4 +161,8 @@ public class VisExitOutVo extends BaseEntity {
|
|||||||
|
|
||||||
private List<VisitorReviewProcessVo> reviewProcessList;
|
private List<VisitorReviewProcessVo> reviewProcessList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小程序判断是否是保安
|
||||||
|
*/
|
||||||
|
private String appDeptId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,6 +164,7 @@
|
|||||||
<if test="exitPermitNo != null and exitPermitNo != ''">and e.exitPermit_no = #{exitPermitNo}</if>
|
<if test="exitPermitNo != null and exitPermitNo != ''">and e.exitPermit_no = #{exitPermitNo}</if>
|
||||||
<if test="examineState != null and examineState != '' and examineState != 3">and e.examine_state = #{examineState}</if>
|
<if test="examineState != null and examineState != '' and examineState != 3">and e.examine_state = #{examineState}</if>
|
||||||
<if test="isExistBack != null">and e.is_exist_back = #{isExistBack}</if>
|
<if test="isExistBack != null">and e.is_exist_back = #{isExistBack}</if>
|
||||||
|
<if test="createBy != null">and e.create_by = #{createBy}</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user