Commit 8693f8c0 authored by tianyiming's avatar tianyiming

bug修改

parent fa0ecf9c
......@@ -230,4 +230,10 @@ public class TzsUserInfo extends BaseEntity {
*/
@TableField(value = "create_date")
protected Date createDate;
@TableField(value = "practice_registration")
private String practiceRegistration;
@TableField(value = "labor_contract")
private String laborContract;
}
......@@ -27,9 +27,9 @@ public enum ConditionEnum {
dateLt("小于", "lt", TechnicalParameter.ParamType.DATE),
dateGe("大于等于", "gte", TechnicalParameter.ParamType.DATE),
dateLe("小于等于", "lte", TechnicalParameter.ParamType.DATE),
in("包含","in", null),
notIn("不包含","notIn", null),
eq("等于","eq", null),
in("包含", "in", null),
notIn("不包含", "notIn", null),
eq("等于", "eq", null),
;
......@@ -49,4 +49,17 @@ public enum ConditionEnum {
}
return jsonArray;
}
public static JSONArray getByCode(String code, TechnicalParameter.ParamType paramType) {
JSONArray jsonArray = new JSONArray();
for (ConditionEnum value : values()) {
if (value.code == code && value.paramType == paramType) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("label", value.name);
jsonObject.put("value", value.code);
jsonArray.add(jsonObject);
}
}
return jsonArray;
}
}
......@@ -87,8 +87,10 @@ public enum EquipAdvanceSearchEnum {
if ("技术参数".equals(item.name)) {
jsonObject.put("type", "select2");
jsonObject.put("method", "POST");
jsonObject.put("conditions", ConditionEnum.getByCode("eq",item.paramType));
} else {
jsonObject.put("conditions", ConditionEnum.getByCode(item.paramType));
}
jsonObject.put("conditions", ConditionEnum.getByCode(item.paramType));
jsonObject.put("url", item.url);
jsonArray.add(jsonObject);
}
......
......@@ -1655,11 +1655,17 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
private void addTechParam(JSONObject techParam, JSONObject paramRange, EnhancedDynamicQueryBuilder builder) {
JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(techParam));
JSONObject js = (JSONObject) jsonObject.get("value");
String field = js.getString("value");
String field = jsonObject.getString("value");
JSONObject js = (JSONObject) jsonObject.get("skillConfig");
String fieldType = js.getString("fieldType");
String itemCondition = paramRange.getString("itemCondition");
Object value = paramRange.get("value");
Object value = null;
if (paramRange.get("value") instanceof JSONObject) {
JSONObject jsValue = (JSONObject) paramRange.get("value");
value = jsValue.get("value");
} else {
value = paramRange.get("value");
}
String andOr = paramRange.getString("andOr");
getParamQuery(field, itemCondition, value, fieldType, true, null, builder, andOr);
}
......@@ -1893,7 +1899,7 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
builder.add(existsQuery, and);
}
}
} else if (field.equals("issueDate")) {
} else if (field.equals("issueDate")) {
BoolQueryBuilder query = QueryBuilders.boolQuery();
switch (itemCondition) {
case "eq":
......@@ -2806,7 +2812,6 @@ public class ComprehensiveStatisticalAnalysisServiceImpl {
}
public JSONArray queryTypeZYXM(String type) {
JSONArray result = new JSONArray();
if ("特种设备安全管理和作业人员证".equals(type)) {
......
......@@ -236,7 +236,7 @@ public class DPSubServiceImpl {
// 气瓶区分车用和非车用
if ("2300".equals(param.getString("EQU_CATEGORY_CODE"))){
keyParams = JsonValueUtils.getValueByKey(content, "keyinfo", "keyinfo.keyParams_2300_" +
("1".equals(param.getString("WHETHER_VEHICLE_CYLINDER")) ? "true" : "false"));
("否".equals(param.getString("WHETHER_VEHICLE_CYLINDER")) || "0".equals(param.getString("WHETHER_VEHICLE_CYLINDER")) ? "true" : "false"));
keyinfo.remove("keyParams_2300_true");
keyinfo.remove("keyParams_2300_false");
} else {
......@@ -254,7 +254,7 @@ public class DPSubServiceImpl {
((JSONArray) keyParams).stream().forEach(x -> {
JSONObject xobj = (JSONObject) x;
xobj.put("type", "text");
xobj.put("value", "param".equals(xobj.getString("source")) ? param.get(xobj.getString("key")) : result.get(xobj.getString("key")));
xobj.put("value", "param".equals(xobj.getString("source")) || "EQU_LIST".equals(xobj.getString("key")) ? param.get(xobj.getString("key")) : result.get(xobj.getString("key")));
});
this.processQRCodeWidget(content.getJSONObject("keyinfo").getJSONObject("qrcode"), result);
......@@ -776,7 +776,20 @@ public class DPSubServiceImpl {
));
jsonObject.put("value", fieldMap.get(value));
}
} else if("tableToTable".equals(xObj.getString("componentKey"))){
} else if ("selectTree".equals(xObj.getString("componentKey"))) {
String name = null;
if (!ValidationUtil.isEmpty(visualParams.getJSONObject("api")) && StrUtil.isNotEmpty(visualParams.getJSONObject("api").getString("apiPath"))) {
ResponseModel selectResult = this.getApiResult(visualParams.getJSONObject("api"), null, apiResult);
if (!ValidationUtil.isEmpty(selectResult) && selectResult.getStatus() == 200 && !ValidationUtil.isEmpty(value)) {
JSONArray result = (JSONArray) selectResult.getResult();
// 递归处理树形结构
name = getTreeNameById(result, value.toString());
}
} else if (!CollectionUtils.isEmpty(visualParams.getJSONArray("data"))) {
name = getTreeNameById(visualParams.getJSONArray("data"), value.toString());
}
jsonObject.put("value", name);
} else if ("tableToTable".equals(xObj.getString("componentKey"))) {
}
}
......@@ -786,6 +799,29 @@ public class DPSubServiceImpl {
return datas;
}
private String getTreeNameById(JSONArray jsonArray, String value) {
final String[] name = new String[1];
if (!ObjectUtils.isEmpty(jsonArray)) {
List<Object> collect = jsonArray.stream().filter(y -> value.equals(JsonValueUtils.getValueByKey(y, "id", "id"))).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(collect)) {
collect.stream().findFirst().ifPresent(z -> name[0] = ((JSONObject) z).getString("name"));
} else {
for (Object object : jsonArray) {
JSONObject object1 = (JSONObject) object;
if (!ObjectUtils.isEmpty(object1.get("children"))) {
name[0] = getTreeNameById(object1.getJSONArray("children"), value);
if (name[0] != null) {
return name[0];
}
}
}
}
} else {
return null;
}
return name[0];
}
public JSONObject buildSubFormData(JSONObject map, int i, JSONObject yObj, Object apiResult) {
JSONArray subs = map.getJSONArray("subs");
JSONArray children = yObj.getJSONArray("children");
......@@ -903,6 +939,7 @@ public class DPSubServiceImpl {
}
}
result = isRefactor ? resultMap : result;
responseModel.setResult(result);
} else if (result instanceof JSONArray) {
JSONArray jsonArray = (JSONArray) result;
......@@ -916,8 +953,8 @@ public class DPSubServiceImpl {
}
}
result = isRefactor ? jsonArray : result;
responseModel.setResult(result);
}
responseModel.setResult(result);
}
return responseModel;
}
......
......@@ -67,7 +67,7 @@ public class UserBizByTCMServiceImpl {
Map<String, Object> maps = new HashMap<>();
TzsUserInfo tzsUserInfo = tzsUserInfoMapper.selectById(id);
TzsUserInfoVo tzsUserInfoVo = new TzsUserInfoVo();
BeanUtils.copyProperties(tzsUserInfo, tzsUserInfoVo, "identification", "profile", "post", "permissionItem", "appointDoc");
BeanUtils.copyProperties(tzsUserInfo, tzsUserInfoVo, "identification", "profile", "post", "permissionItem", "appointDoc","practiceRegistration","laborContract");
if (!ObjectUtils.isEmpty(tzsUserInfo.getPost())) {
tzsUserInfoVo.setPost(JSON.parseArray(tzsUserInfo.getPost()));
}
......@@ -83,6 +83,8 @@ public class UserBizByTCMServiceImpl {
tzsUserInfoVo.setIdentification(ObjectUtils.isEmpty(tzsUserInfo.getIdentification()) ? null : JSON.parseArray(tzsUserInfo.getIdentification()));
tzsUserInfoVo.setProfile(ObjectUtils.isEmpty(tzsUserInfo.getProfile()) ? null : JSON.parseArray(tzsUserInfo.getProfile()));
tzsUserInfoVo.setAppointDoc(ObjectUtils.isEmpty(tzsUserInfo.getAppointDoc()) ? null : JSON.parseArray(tzsUserInfo.getAppointDoc()));
tzsUserInfoVo.setPracticeRegistration(ObjectUtils.isEmpty(tzsUserInfo.getPracticeRegistration()) ? null : JSON.parseArray(tzsUserInfo.getPracticeRegistration()));
tzsUserInfoVo.setLaborContract(ObjectUtils.isEmpty(tzsUserInfo.getLaborContract()) ? null : JSON.parseArray(tzsUserInfo.getLaborContract()));
tzsUserInfoVo.setOtherAccessories(ObjectUtils.isEmpty(tzsUserInfo.getOtherAccessories()) ? null : JSON.parseArray(tzsUserInfo.getOtherAccessories()));
tzsUserInfoVo.setBirthday(tzsUserInfo.getBirthday() != null ? DateUtils.longStrDate(tzsUserInfo.getBirthday()): null);
tzsUserInfoVo.setSpeciality_required(tzsUserInfo.getSpeciality());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment