dev_xds
haha 2024-03-22 21:59:10 +08:00
commit 17d7b923e2
7 changed files with 49 additions and 9 deletions

View File

@ -837,7 +837,29 @@ public class LabourApiController extends BaseController {
}
public static void main(String[] args) {
pushLabourGroup();
String baseUrl = "https://szgc.jhncidg.com/jhapi";
String timestamp = String.valueOf(System.currentTimeMillis());
String appId = "jhcf17054840354615gUkkFJvTn003";
try {
// 明文信息->公钥加密
String encryptByPublicKeyStr = AuthRsaUtils.encryptByPublicKey(publicKey, appId+timestamp);
log.info("公钥加密...{}" , encryptByPublicKeyStr);
// redis中查询->未查询到则重新获取
String url = baseUrl + "/api/labour/v1/getToken";
Map<String, Object> body = new HashMap<>();
body.put("appId",appId);
body.put("sign",encryptByPublicKeyStr);
body.put("timestamp",timestamp);
String result = HttpClientUtil.doPost(url, null, com.alibaba.fastjson2.JSON.toJSONString(body));
JSONObject jsonObject = JSONObject.parseObject(result);
if(jsonObject.getInteger("code")==200){
// 获取到存入redis设置30分钟有效期
String token = jsonObject.getString("Authorization");
log.info("Authorization...{}" , token);
}
}catch (Exception e){
e.printStackTrace();
}
}
}

View File

@ -44,6 +44,14 @@
/>
</el-select>
</el-form-item>
<el-form-item label="整改人" prop="lordSent">
<el-input
v-model="queryParams.lordSent"
placeholder="请输入整改人姓名/联系方式"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="提交时间">
<el-date-picker
v-model="daterangeMarksTime"

View File

@ -16,7 +16,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="隐患分类" prop="createUser">
<el-form-item label="隐患分类" prop="roleTypes">
<el-select v-model="queryParams.roleTypes" multiple placeholder="请选择隐患分类" clearable collapse-tags>
<el-option
v-for="dict in roleTypeOpts"
@ -44,6 +44,14 @@
/>
</el-select>
</el-form-item>
<el-form-item label="整改人" prop="lordSent">
<el-input
v-model="queryParams.lordSent"
placeholder="请输入整改人姓名/联系方式"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="提交时间">
<el-date-picker
v-model="daterangeMarksTime"

View File

@ -481,13 +481,14 @@ export default {
this.deptOptions = response.data;
this.open = true;
});
let that = this;
getWorkTrain(id).then((response) => {
this.form = response.data;
that.form = response.data;
let depts = [];
this.form.workTrainDeptList.forEach((item) => {
that.form.workTrainDeptList.forEach((item) => {
depts.push(item.deptId);
});
this.form.workTrainDeptList = depts;
that.form.workTrainDeptList = depts;
if (that.form.trainFile) {
that.files = that.form.trainFile.split(",");
}

View File

@ -77,7 +77,6 @@ public class CaptchaController
capStr = code = captchaProducer.createText();
image = captchaProducer.createImage(capStr);
}
System.out.println("CODE======================>>>>"+code);
redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
// 转换流信息写出
FastByteArrayOutputStream os = new FastByteArrayOutputStream();

View File

@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
<if test="workParts != null and workParts != ''"> and ssp.workParts like concat('%', #{workParts}, '%')</if>
<if test="changeInfo != null and changeInfo != ''"> and ssp.changeInfo like concat('%', #{changeInfo}, '%')</if>
<if test="lordSent != null and lordSent != ''"> and ssp.lordSent = #{lordSent}</if>
<if test="lordSent != null and lordSent != ''"> and (ssp.lordSent like concat('%', #{lordSent}, '%') or ssp.lordSentUser like concat('%', #{lordSent}, '%'))</if>
<if test="lordSentUser != null and lordSentUser != ''"> and ssp.lordSentUser = #{lordSentUser}</if>
<if test="copySend != null and copySend != ''"> and ssp.copySend = #{copySend}</if>
<if test="copySendUser != null and copySendUser != ''"> and ssp.copySendUser = #{copySendUser}</if>
@ -215,6 +215,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workParts != null and workParts != ''"> and ssp.workParts like concat('%', #{workParts}, '%')</if>
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>
<if test="dangerType != null and dangerType != ''"> and ssp.danger_type = #{dangerType}</if>
<if test="lordSent != null and lordSent != ''"> and (ssp.lordSent like concat('%', #{lordSent}, '%') or ssp.lordSentUser like concat('%', #{lordSent}, '%'))</if>
<if test="params.beginMarksTime != null and params.beginMarksTime != '' and params.endMarksTime != null and params.endMarksTime != ''"> and date(ssp.createTime) between #{params.beginMarksTime} and #{params.endMarksTime}</if>
<!-- 查询条件-项目部门 -->
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
@ -241,6 +242,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
and (date(NOW())<![CDATA[ > ]]> date(ssp.nickedTime) and (ssp.updateTime is null or date(ssp.updateTime) <![CDATA[ > ]]> date(ssp.nickedTime)))
<if test="infoType !=null">and infoType=#{infoType}</if>
<if test="lordSent != null and lordSent != ''"> and (ssp.lordSent like concat('%', #{lordSent}, '%') or ssp.lordSentUser like concat('%', #{lordSent}, '%'))</if>
<if test="problemArea != null and problemArea != ''"> and ssp.problemArea like concat('%', #{problemArea}, '%')</if>
<if test="workParts != null and workParts != ''"> and ssp.workParts like concat('%', #{workParts}, '%')</if>
<if test="createUser != null and createUser != ''"> and ssp.createUser like concat('%', #{createUser}, '%')</if>

View File

@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectWorkTrainList" parameterType="WorkTrain" resultMap="WorkTrainResult">
select wt.id, wt.project_id, wt.project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.train_file, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, wt.data_type, sdd.dict_label as data_type_name, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames
select wt.id, wt.project_id, sp.projectName as project_name, wt.main_image, wt.train_type, wt.train_title, wt.train_nature, wt.train_participants, wt.begin_date, wt.end_date, wt.train_content, wt.train_file, wt.is_del, wt.create_by, wt.create_time, wt.update_by, wt.update_time, wt.remark, wt.data_type, sdd.dict_label as data_type_name, group_concat(sd.dept_id) as trainDeptIds, group_concat(sd.dept_name) as trainDeptNames
from work_train wt
left join work_train_dept wtd on wtd.train_id = wt.id
left join sys_dept sd on sd.dept_id = wtd.dept_id
@ -60,7 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectId != null"> and wt.project_id = #{projectId}</if>
<if test="deptId != null"> and wtd2.dept_id = #{deptId}</if>
<if test="dataType != null"> and wt.data_type = #{dataType}</if>
<if test="projectName != null and projectName != ''"> and wt.project_name like concat('%', #{projectName}, '%')</if>
<if test="projectName != null and projectName != ''"> and sp.projectName like concat('%', #{projectName}, '%')</if>
<if test="trainType != null and trainType != ''"> and train_type = #{trainType}</if>
<if test="trainTitle != null and trainTitle != ''"> and train_title like concat('%', #{trainTitle}, '%')</if>
<if test="trainNature != null and trainNature != ''"> and wt.train_nature = #{trainNature}</if>