Commit 06e5a064 authored by chenzhao's avatar chenzhao

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register
parents ba10b0e3 60898c49
...@@ -91,4 +91,11 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> { ...@@ -91,4 +91,11 @@ public interface CylinderInfoMapper extends BaseMapper<CylinderInfo> {
void updateEsCylinderInfoStatus(@Param("ids")List<String> ids); void updateEsCylinderInfoStatus(@Param("ids")List<String> ids);
Integer saveOrUpdateBatch(@Param("list") List<CylinderInfo> list); Integer saveOrUpdateBatch(@Param("list") List<CylinderInfo> list);
Page<Map<String,Object>> timeOutList(@Param("page") Page<Map<String, Object>> page, @Param("companyId") String companyId, @Param("regionCode") String regionCode);
Page<Map<String,Object>> licenceList(@Param("page") Page<Map<String, Object>> page, @Param("companyId") String companyId);
int countNumber(@Param("status") String status, @Param("companyId") String companyId, @Param("regionCode") String regionCode);
} }
...@@ -310,7 +310,8 @@ ...@@ -310,7 +310,8 @@
d3.name AS cylinder_status_str, d3.name AS cylinder_status_str,
ct.qrCode, ct.qrCode,
ct.electronic_label_code, ct.electronic_label_code,
cu.region_code cu.region_code,
(SELECT date_format(inspection_date,'%Y-%m-%d %h:%m:%s') from tz_cylinder_filling where sequence_code = ci.sequence_code and app_id = cu.app_id ORDER BY inspection_date desc limit 1) as inspectionDate
FROM FROM
tz_cylinder_info AS ci tz_cylinder_info AS ci
LEFT JOIN cb_data_dictionary AS d1 ON d1.type = 'CZJZMC' AND d1.code = ci.filling_media LEFT JOIN cb_data_dictionary AS d1 ON d1.type = 'CZJZMC' AND d1.code = ci.filling_media
...@@ -335,6 +336,93 @@ ...@@ -335,6 +336,93 @@
where ci.is_not_es IS NULL where ci.is_not_es IS NULL
AND region_code is not null AND region_code is not null
</select> </select>
<select id="timeOutList" resultType="java.util.Map">
SELECT DISTINCT(onlyCode),sequence_code,status,expire_day,unit_name
FROM(
SELECT
concat(insp.app_id,insp.sequence_code) as onlyCode,
insp.sequence_code,
unit.unit_name ,
CASE
WHEN ( now() > ( to_date(( insp.next_inspection_date ), 'yyyy-mm-dd' )) ) THEN
'已超期'
WHEN ((
to_days (( to_date(( insp.next_inspection_date ) , 'yyyy-mm-dd' )) ) - to_days (
now())) &lt;= 30
) THEN
'即将超期'
END AS status,
concat ((
to_days (( to_date(( insp.next_inspection_date ) :: TEXT, 'yyyy-mm-dd' :: TEXT )) ) - to_days (
now())),
'天'
) AS expire_day
FROM
tz_cylinder_inspection insp
LEFT JOIN tz_cylinder_unit unit ON insp.app_id = unit.app_id
WHERE
(to_date( insp.next_inspection_date, 'yyyy-mm-dd' ) &lt; now()
OR (( to_days ( to_date(( insp.next_inspection_date ), 'yyyy-mm-dd' ) ) - to_days ( now())) &lt;= 30 ))
<if test="companyId != null and companyId != ''">
and unit.app_id = #{companyId}
</if>
<if test="regionCode != null and regionCode != ''">
and unit.region_code like concat('%',#{regionCode},'%')
</if>
)
</select>
<select id="licenceList" resultType="java.util.Map">
SELECT status,
filling_perm_scope,
filling_permit_date,
unit_name
FROM view_licence_unit_table
<where>
<if test="companyId != null and companyId != ''">
app_id = #{companyId}
</if>
</where>
</select>
<select id="countNumber" resultType="java.lang.Integer">
SELECT count(DISTINCT(onlyCode))
FROM(
SELECT
concat(insp.app_id,insp.sequence_code) as onlyCode,
insp.sequence_code,
unit.unit_name ,
CASE
WHEN ( now() > ( to_date(( insp.next_inspection_date ), 'yyyy-mm-dd' )) ) THEN
'已超期'
WHEN ((
to_days (( to_date(( insp.next_inspection_date ) , 'yyyy-mm-dd' )) ) - to_days (
now())) &lt;= 30
) THEN
'即将超期'
END AS status,
concat ((
to_days (( to_date(( insp.next_inspection_date ) :: TEXT, 'yyyy-mm-dd' :: TEXT )) ) - to_days (
now())),
'天'
) AS expire_day
FROM
tz_cylinder_inspection insp
LEFT JOIN tz_cylinder_unit unit ON insp.app_id = unit.app_id
WHERE
(to_date( insp.next_inspection_date, 'yyyy-mm-dd' ) &lt; now()
OR (( to_days ( to_date(( insp.next_inspection_date ), 'yyyy-mm-dd' ) ) - to_days ( now())) &lt;= 30 ))
<if test="companyId != null and companyId != ''">
and unit.app_id = #{companyId}
</if>
)where status = #{status}
<if test="regionCode != null and regionCode != ''">
and unit.region_code like concat('%',#{regionCode},'%')
</if>
</select>
<update id="updateEsCylinderInfoStatus"> <update id="updateEsCylinderInfoStatus">
UPDATE tz_cylinder_info SET "is_not_es" = 1 WHERE "sequence_nbr" IN UPDATE tz_cylinder_info SET "is_not_es" = 1 WHERE "sequence_nbr" IN
......
...@@ -1200,4 +1200,133 @@ public class CylinderInfoController extends BaseController { ...@@ -1200,4 +1200,133 @@ public class CylinderInfoController extends BaseController {
return ResponseHelper.buildResponse(true); return ResponseHelper.buildResponse(true);
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "超期列表")
@GetMapping(value = "/timeOutList")
public ResponseModel<Object> timeOutList(@RequestParam("number") Long number, @RequestParam("size") Long size, @RequestParam(value = "companyId", required = false) String companyId, @RequestParam(value = "regionCode", required = false) String regionCode) {
Page<Map<String, Object>> page = new Page<>(number, size);
HashMap<String, Object> map = new HashMap<>();
HashMap<String, Object> result = new HashMap<>();
Page<Map<String, Object>> mapPage = cylinderInfoServiceImpl.getBaseMapper().timeOutList(page, companyId, regionCode);
// 组装分页信息
map.put("current", page.getCurrent());
map.put("pageSize", page.getSize());
map.put("total", mapPage.getTotal());
map.put("pagination", false);
map.put("totalPage", mapPage.getPages());
map.put("dataList", mapPage.getRecords());
result.put("dataGridMock", map);
// 组装表头信息
ArrayList<Map<String, Object>> maps = new ArrayList<>();
HashMap<String, Object> status = new HashMap<>();
status.put("fid", "status");
status.put("dataIndex", "status");
status.put("name", "状态");
status.put("title", "状态");
status.put("type", "dataGrid");
status.put("key", "status");
maps.add(status);
// 检验有效期
HashMap<String, Object> expire_day = new HashMap<>();
expire_day.put("fid", "expire_day");
expire_day.put("dataIndex", "expire_day");
expire_day.put("name", "检验有效期");
expire_day.put("title", "检验有效期");
expire_day.put("type", "dataGrid");
expire_day.put("key", "expire_day");
maps.add(expire_day);
// 气瓶编码
HashMap<String, Object> sequence_code = new HashMap<>();
sequence_code.put("fid", "sequence_code");
sequence_code.put("dataIndex", "sequence_code");
sequence_code.put("name", "气瓶编码");
sequence_code.put("title", "气瓶编码");
sequence_code.put("type", "dataGrid");
sequence_code.put("key", "sequence_code");
maps.add(sequence_code);
// 产权单位
HashMap<String, Object> unit_name = new HashMap<>();
unit_name.put("fid", "unit_name");
unit_name.put("dataIndex", "unit_name");
unit_name.put("name", "产权单位");
unit_name.put("title", "产权单位");
unit_name.put("type", "dataGrid");
unit_name.put("key", "unit_name");
maps.add(unit_name);
result.put("colModel", maps);
return ResponseHelper.buildResponse(result);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "许可列表")
@GetMapping(value = "/licenceList")
public ResponseModel<Object> licenceList(@RequestParam("number") Long number, @RequestParam("size") Long size, @RequestParam(value = "companyId", required = false) String companyId) {
Page<Map<String, Object>> page = new Page<>(number, size);
HashMap<String, Object> map = new HashMap<>();
HashMap<String, Object> result = new HashMap<>();
Page<Map<String, Object>> mapPage = cylinderInfoServiceImpl.getBaseMapper().licenceList(page, companyId);
// 组装分页信息
map.put("current", page.getCurrent());
map.put("pageSize", page.getSize());
map.put("total", mapPage.getTotal());
map.put("pagination", false);
map.put("totalPage", mapPage.getPages());
map.put("dataList", mapPage.getRecords());
result.put("dataGridMock", map);
// 组装表头信息
ArrayList<Map<String, Object>> maps = new ArrayList<>();
HashMap<String, Object> status = new HashMap<>();
status.put("fid", "status");
status.put("dataIndex", "status");
status.put("name", "状态");
status.put("title", "状态");
status.put("type", "dataGrid");
status.put("key", "status");
maps.add(status);
// 许可范围
HashMap<String, Object> filling_perm_scope = new HashMap<>();
filling_perm_scope.put("fid", "filling_perm_scope");
filling_perm_scope.put("dataIndex", "filling_perm_scope");
filling_perm_scope.put("name", "检验有效期");
filling_perm_scope.put("title", "检验有效期");
filling_perm_scope.put("type", "dataGrid");
filling_perm_scope.put("key", "expire_day");
maps.add(filling_perm_scope);
// 许可有效期
HashMap<String, Object> filling_permit_date = new HashMap<>();
filling_permit_date.put("fid", "filling_permit_date");
filling_permit_date.put("dataIndex", "filling_permit_date");
filling_permit_date.put("name", "许可范围");
filling_permit_date.put("title", "许可范围");
filling_permit_date.put("type", "dataGrid");
filling_permit_date.put("key", "sequence_code");
maps.add(filling_permit_date);
// 气瓶企业
HashMap<String, Object> unit_name = new HashMap<>();
unit_name.put("fid", "unit_name");
unit_name.put("dataIndex", "unit_name");
unit_name.put("name", "气瓶企业");
unit_name.put("title", "气瓶企业");
unit_name.put("type", "dataGrid");
unit_name.put("key", "unit_name");
maps.add(unit_name);
result.put("colModel", maps);
return ResponseHelper.buildResponse(result);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET", value = "统计")
@GetMapping(value = "/countNumber")
public ResponseModel<Object> countNumber(@RequestParam("status") String status, @RequestParam(value = "companyId", required = false) String companyId, @RequestParam(value = "regionCode", required = false) String regionCode) {
HashMap<String, Object> map = new HashMap<>();
int number = cylinderInfoServiceImpl.getBaseMapper().countNumber(status, companyId, regionCode);
map.put("status", number);
return ResponseHelper.buildResponse(map);
}
} }
...@@ -48,7 +48,9 @@ import org.typroject.tyboot.core.rdbms.service.BaseService; ...@@ -48,7 +48,9 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -467,6 +469,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -467,6 +469,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
@Override @Override
public void synUnitCylinderFillingData() { public void synUnitCylinderFillingData() {
DecimalFormat df = new DecimalFormat("#0.00");
cylinderFillingDataUnitServiceImpl.remove(new LambdaQueryWrapper<>()); cylinderFillingDataUnitServiceImpl.remove(new LambdaQueryWrapper<>());
countByUnit(cylinderUnit -> { countByUnit(cylinderUnit -> {
// 按照月份 获取数据 取一年数据 // 按照月份 获取数据 取一年数据
...@@ -485,7 +488,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -485,7 +488,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
// 本月 // 本月
Double thisMonth = cylinderFillingRecordServiceImpl.getFillingSumByMonth(cylinderUnit.getAppId(), Double thisMonth = cylinderFillingRecordServiceImpl.getFillingSumByMonth(cylinderUnit.getAppId(),
calendar.getTime()); calendar.getTime());
temp.setTotalSum(thisMonth); temp.setTotalSum(Double.valueOf(df.format(thisMonth)));
calendar.add(Calendar.MONTH, -1); calendar.add(Calendar.MONTH, -1);
// 上月 // 上月
Double lastMonth = cylinderFillingRecordServiceImpl.getFillingSumByMonth(cylinderUnit.getAppId(), Double lastMonth = cylinderFillingRecordServiceImpl.getFillingSumByMonth(cylinderUnit.getAppId(),
...@@ -499,6 +502,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -499,6 +502,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
temp.setChangePercent((int) (percent * 100) + ""); temp.setChangePercent((int) (percent * 100) + "");
temp.setAppId(cylinderUnit.getAppId()); temp.setAppId(cylinderUnit.getAppId());
temp.setChangeSum(thisMonth - lastMonth); temp.setChangeSum(thisMonth - lastMonth);
temp.setChangeSum(Double.valueOf(df.format(temp.getChangeSum())));
cylinderFillingDataUnitServiceImpl.createWithModel(temp); cylinderFillingDataUnitServiceImpl.createWithModel(temp);
} }
}); });
...@@ -667,6 +671,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -667,6 +671,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
* @param cylinderFillingCheckDataUnitDto * @param cylinderFillingCheckDataUnitDto
*/ */
public void calcCylinderFillingCheckDataUnitData(CylinderUnit cylinderUnit, Calendar calender, CylinderFillingCheckDataUnitDto cylinderFillingCheckDataUnitDto) { public void calcCylinderFillingCheckDataUnitData(CylinderUnit cylinderUnit, Calendar calender, CylinderFillingCheckDataUnitDto cylinderFillingCheckDataUnitDto) {
DecimalFormat df = new DecimalFormat("#0.00");
String year = calender.get(Calendar.YEAR) + ""; String year = calender.get(Calendar.YEAR) + "";
int month = calender.get(Calendar.MONTH) + 1; int month = calender.get(Calendar.MONTH) + 1;
String monthStr = month < 10 ? "0" + month : month + ""; String monthStr = month < 10 ? "0" + month : month + "";
...@@ -687,14 +692,14 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -687,14 +692,14 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
before = (double) (fillingCount) / (double) countThisMonth; before = (double) (fillingCount) / (double) countThisMonth;
} }
cylinderFillingCheckDataUnitDto.setFillingCount((long) fillingCount); cylinderFillingCheckDataUnitDto.setFillingCount((long) fillingCount);
cylinderFillingCheckDataUnitDto.setFillingPercent(before * 100); cylinderFillingCheckDataUnitDto.setFillingPercent(Double.valueOf(df.format(before * 100)));
// 充装后检查率:充装后检查次数/充装次数 // 充装后检查率:充装后检查次数/充装次数
double after = 0d; double after = 0d;
if (countThisMonth != 0) { if (countThisMonth != 0) {
after = (double) (fillingCheckCount) / (double) countThisMonth; after = (double) (fillingCheckCount) / (double) countThisMonth;
} }
cylinderFillingCheckDataUnitDto.setFillingCheckCount((long) fillingCheckCount); cylinderFillingCheckDataUnitDto.setFillingCheckCount((long) fillingCheckCount);
cylinderFillingCheckDataUnitDto.setFillingCheckPercent(after * 100); cylinderFillingCheckDataUnitDto.setFillingCheckPercent(Double.valueOf(df.format(after * 100)));
// 充装合格率:充装前检查合格次数+充装后检查合格次数/2*充装次数 // 充装合格率:充装前检查合格次数+充装后检查合格次数/2*充装次数
double passed = 0d; double passed = 0d;
// 充装前检查合格次数 // 充装前检查合格次数
...@@ -709,7 +714,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -709,7 +714,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
} }
cylinderFillingCheckDataUnitDto.setFillingPassedCount((long) (fillingPassedCount + fillingCheckPassedCount)); cylinderFillingCheckDataUnitDto.setFillingPassedCount((long) (fillingPassedCount + fillingCheckPassedCount));
cylinderFillingCheckDataUnitDto.setTotalSumDouble((long) 2 * countThisMonth); cylinderFillingCheckDataUnitDto.setTotalSumDouble((long) 2 * countThisMonth);
cylinderFillingCheckDataUnitDto.setFillingPassedPercent(passed * 100); cylinderFillingCheckDataUnitDto.setFillingPassedPercent(Double.valueOf(df.format(passed * 100)));
cylinderFillingCheckDataUnitDto.setAppId(cylinderUnit.getAppId()); cylinderFillingCheckDataUnitDto.setAppId(cylinderUnit.getAppId());
} }
......
...@@ -102,7 +102,7 @@ public class JgEquipTransferDto extends BaseDto { ...@@ -102,7 +102,7 @@ public class JgEquipTransferDto extends BaseDto {
private String factoryNum; private String factoryNum;
@ApiModelProperty(value = "设备注册代码") @ApiModelProperty(value = "设备注册代码")
private String equRegisterCode; private String equCode;
@ApiModelProperty(value = "监管码") @ApiModelProperty(value = "监管码")
private String supervisoryCode; private String supervisoryCode;
......
...@@ -23,14 +23,15 @@ ...@@ -23,14 +23,15 @@
jet.instance_status AS instanceStatus, jet.instance_status AS instanceStatus,
jet.accept_date AS acceptDate, jet.accept_date AS acceptDate,
jet.task_name AS taskName, jet.task_name AS taskName,
ri.equ_list AS equList, ri.EQU_LIST AS equList,
ri.equ_category AS equCategory, ri.EQU_CATEGORY AS equCategory,
ri.equ_define AS equDefine, ri.EQU_DEFINE AS equDefine,
ri.product_name AS productName, ri.PRODUCT_NAME AS productName,
ri.brand_name AS brandName, ri.BRAND_NAME AS brandName,
ri.equ_type AS equType, ri.EQU_TYPE AS equType,
ri.equ_price AS equPrice, ri.EQU_PRICE AS equPrice,
ri.product_photo AS productPhoto, ri.PRODUCT_PHOTO AS productPhoto,
ri.EQU_CODE,
di.design_unit_credit_code AS designUnitCreditCode, di.design_unit_credit_code AS designUnitCreditCode,
di.design_unit_name AS designUnitName, di.design_unit_name AS designUnitName,
di.design_license_num AS designLicenseNum, di.design_license_num AS designLicenseNum,
...@@ -53,7 +54,7 @@ ...@@ -53,7 +54,7 @@
fi.ins_use_maintain_explain AS insUseMaintainExplain, fi.ins_use_maintain_explain AS insUseMaintainExplain,
ui.safety_manager AS safetyManager, ui.safety_manager AS safetyManager,
ui.phone AS safetyManagerPhone, ui.phone AS safetyManagerPhone,
CONCAT(ui.PROVINCE_NAME,'', ui.CITY_NAME, ' ', ui.COUNTY_NAME, ' ', ui.ADDRESS, ' ', ui.street_name) AS concatenatedAddress, CONCAT_WS(', ',ui.PROVINCE_NAME, ui.CITY_NAME, ui.COUNTY_NAME, ui.STREET_NAME, ui.ADDRESS) AS concatenatedAddress,
ui.USE_INNER_CODE AS useInnerCode, ui.USE_INNER_CODE AS useInnerCode,
oi.SUPERVISORY_CODE AS supervisoryCode oi.SUPERVISORY_CODE AS supervisoryCode
FROM FROM
...@@ -120,6 +121,7 @@ ...@@ -120,6 +121,7 @@
ri.equ_type AS equType, ri.equ_type AS equType,
ri.equ_price AS equPrice, ri.equ_price AS equPrice,
ri.product_photo AS productPhoto, ri.product_photo AS productPhoto,
ri.EQU_CODE as equCode,
di.design_unit_credit_code AS designUnitCreditCode, di.design_unit_credit_code AS designUnitCreditCode,
di.design_unit_name AS designUnitName, di.design_unit_name AS designUnitName,
di.design_license_num AS designLicenseNum, di.design_license_num AS designLicenseNum,
......
...@@ -343,7 +343,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -343,7 +343,7 @@ public class CommonServiceImpl implements ICommonService {
map.put("giveOutMonth", Optional.ofNullable(map.get("giveOutMonth")).orElse("").toString()); // 发证日期-月 map.put("giveOutMonth", Optional.ofNullable(map.get("giveOutMonth")).orElse("").toString()); // 发证日期-月
map.put("giveOutDay", Optional.ofNullable(map.get("giveOutDay")).orElse("").toString()); // 发证日期-日 map.put("giveOutDay", Optional.ofNullable(map.get("giveOutDay")).orElse("").toString()); // 发证日期-日
// 生成二维码 // 生成二维码
String qrCode = ImageUtils.generateQRCode(Optional.ofNullable(map.get("supervisoryCode")).orElse("").toString(), 70, 65); String qrCode = ImageUtils.generateQRCode(Optional.ofNullable(map.get("supervisoryCode")).orElse("").toString(), 100, 100);
map.put("supervisoryCode", qrCode); // 监管二维码 map.put("supervisoryCode", qrCode); // 监管二维码
// word转pdf // word转pdf
......
...@@ -553,23 +553,25 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -553,23 +553,25 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
// 根据当前登录用户类型及管辖机构筛选条件添加对应参数 // 根据当前登录用户类型及管辖机构筛选条件添加对应参数
if (!ValidationUtil.isEmpty(type) && type.contains("使用单位")) { if (ObjectUtils.isEmpty(map.getString("SEQUENCE_NBR")) && ObjectUtils.isEmpty(map.getString("useUnitCreditCode"))) {
if(ValidationUtil.isEmpty(map.getString("USE_UNIT_CREDIT_CODE"))){ if (!ValidationUtil.isEmpty(type) && type.contains("使用单位")) {
map.put("USE_UNIT_CREDIT_CODE", companyCode); if(ValidationUtil.isEmpty(map.getString("USE_UNIT_CREDIT_CODE"))){
map.put("USE_UNIT_CREDIT_CODE", companyCode);
}
} else if (!ValidationUtil.isEmpty(type) && type.contains("安装改造维修单位")) {
map.put("USC_UNIT_CREDIT_CODE", companyCode);
}else {
result.setRecords(new ArrayList<>());
result.setTotal(0);
return result;
} }
} else if (!ValidationUtil.isEmpty(type) && type.contains("安装改造维修单位")) {
map.put("USC_UNIT_CREDIT_CODE", companyCode);
}else {
result.setRecords(new ArrayList<>());
result.setTotal(0);
return result;
} }
// 默认条件【STATUS==="" || null】 // 默认条件【STATUS==="" || null】
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
meBuilder.must(QueryBuilders.boolQuery() meBuilder.should(QueryBuilders.boolQuery().mustNot(QueryBuilders.existsQuery("STATUS")));
.should(QueryBuilders.boolQuery().mustNot(QueryBuilders.existsQuery("STATUS"))) meBuilder.should(QueryBuilders.boolQuery().must(QueryBuilders.matchPhraseQuery("STATUS", "")));
.should(QueryBuilders.boolQuery().must(QueryBuilders.matchPhraseQuery("STATUS", "")))); meBuilder.minimumShouldMatch(1);
boolMust.must(meBuilder); boolMust.must(meBuilder);
String queryType = map.getString("QUERY_TYPE"); String queryType = map.getString("QUERY_TYPE");
...@@ -635,24 +637,25 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -635,24 +637,25 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
BoolQueryBuilder ubuilder = QueryBuilders.boolQuery(); BoolQueryBuilder ubuilder = QueryBuilders.boolQuery();
String useCode = QueryParser.escape(map.getString("USE_UNIT_CREDIT_CODE")); String useCode = QueryParser.escape(map.getString("USE_UNIT_CREDIT_CODE"));
useCode = useCode.contains("_") ? useCode.split("_")[0] : useCode; useCode = useCode.contains("_") ? useCode.split("_")[0] : useCode;
ubuilder.should(QueryBuilders.termQuery("USE_UNIT_CREDIT_CODE.keyword", useCode)); ubuilder.should(QueryBuilders.matchQuery("USE_UNIT_CREDIT_CODE", useCode));
String uscCode = QueryParser.escape(map.getString("USC_UNIT_CREDIT_CODE")); String uscCode = QueryParser.escape(map.getString("USC_UNIT_CREDIT_CODE"));
ubuilder.should(QueryBuilders.termQuery("USC_UNIT_CREDIT_CODE.keyword", uscCode)); ubuilder.should(QueryBuilders.matchPhraseQuery("USC_UNIT_CREDIT_CODE", "*" + uscCode + "*"));
ubuilder.minimumShouldMatch(1); ubuilder.minimumShouldMatch(1);
boolMust.must(ubuilder); boolMust.must(ubuilder);
}else { }else {
if (!ObjectUtils.isEmpty(map.getString("USE_UNIT_CREDIT_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("USE_UNIT_CREDIT_CODE")) || !ObjectUtils.isEmpty(map.getString("useUnitCreditCode"))) {
BoolQueryBuilder uuccBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder uuccBuilder = QueryBuilders.boolQuery();
String param = QueryParser.escape(map.getString("USE_UNIT_CREDIT_CODE")); String uucc = !ValidationUtil.isEmpty(map.getString("USE_UNIT_CREDIT_CODE")) ? map.getString("USE_UNIT_CREDIT_CODE") : map.getString("useUnitCreditCode");
String param = QueryParser.escape(uucc);
param = param.contains("_") ? param.split("_")[0] : param; param = param.contains("_") ? param.split("_")[0] : param;
uuccBuilder.must(QueryBuilders.matchPhraseQuery("USE_UNIT_CREDIT_CODE", param)); uuccBuilder.must(QueryBuilders.matchQuery("USE_UNIT_CREDIT_CODE", param));
boolMust.must(uuccBuilder); boolMust.must(uuccBuilder);
} }
if (!ObjectUtils.isEmpty(map.getString("USC_UNIT_CREDIT_CODE"))) { if (!ObjectUtils.isEmpty(map.getString("USC_UNIT_CREDIT_CODE"))) {
BoolQueryBuilder uuccBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder uuccBuilder = QueryBuilders.boolQuery();
String param = QueryParser.escape(map.getString("USC_UNIT_CREDIT_CODE")); String uscCode = QueryParser.escape(map.getString("USC_UNIT_CREDIT_CODE"));
uuccBuilder.must(QueryBuilders.matchPhraseQuery("USC_UNIT_CREDIT_CODE", param)); uuccBuilder.must(QueryBuilders.matchPhraseQuery("USC_UNIT_CREDIT_CODE", "*" + uscCode + "*"));
boolMust.must(uuccBuilder); boolMust.must(uuccBuilder);
} }
} }
...@@ -729,6 +732,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -729,6 +732,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (!ValidationUtil.isEmpty(company)) { if (!ValidationUtil.isEmpty(company)) {
object.put("level", company.getLevel()); object.put("level", company.getLevel());
object.put("orgCode", company.getOrgCode()); object.put("orgCode", company.getOrgCode());
object.put("companyName", company.getCompanyName());
object.put("companyCode", company.getCompanyCode()); object.put("companyCode", company.getCompanyCode());
CompanyModel result = Privilege.companyClient.queryByCompanyCode(company.getCompanyCode()).getResult(); CompanyModel result = Privilege.companyClient.queryByCompanyCode(company.getCompanyCode()).getResult();
if(!ValidationUtil.isEmpty(result)){ if(!ValidationUtil.isEmpty(result)){
...@@ -768,9 +772,15 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -768,9 +772,15 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgFactoryInfoService.saveOrUpdateData(factoryInfo); iIdxBizJgFactoryInfoService.saveOrUpdateData(factoryInfo);
//施工信息 //施工信息
JSONObject company = getCompanyType();
String companyName = company.getString("companyName");
String companyCode = company.getString("companyCode").contains("_") ?
company.getString("companyCode").split("_")[1] : company.getString("companyCode");
IdxBizJgConstructionInfo constructionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgConstructionInfo.class); IdxBizJgConstructionInfo constructionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgConstructionInfo.class);
constructionInfo.setRecord(record); constructionInfo.setRecord(record);
constructionInfo.setRecDate(date); constructionInfo.setRecDate(date);
constructionInfo.setUscUnitCreditCode(companyCode);
constructionInfo.setUscUnitName(companyName);
constructionInfo.setSequenceNbr(OPERATESAVE.equals(operateType) ? UUID.randomUUID().toString() : String.valueOf(equipmentInfoForm.get("CONSTRUCTIONINFO_SEQ"))); constructionInfo.setSequenceNbr(OPERATESAVE.equals(operateType) ? UUID.randomUUID().toString() : String.valueOf(equipmentInfoForm.get("CONSTRUCTIONINFO_SEQ")));
iIdxBizJgConstructionInfoService.saveOrUpdateData(constructionInfo); iIdxBizJgConstructionInfoService.saveOrUpdateData(constructionInfo);
......
...@@ -430,6 +430,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -430,6 +430,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
public void flowExecute(Long id, String instanceId, String operate, String comment) { public void flowExecute(Long id, String instanceId, String operate, String comment) {
try { try {
JgChangeRegistrationName jgChangeRegistrationName = this.getBaseMapper().selectById(id);
JSONObject task = workFlowFeignService.getTaskNoAuth(instanceId); JSONObject task = workFlowFeignService.getTaskNoAuth(instanceId);
JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data"))); JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data")));
String taskId = taskMessage.getString("id"); String taskId = taskMessage.getString("id");
...@@ -440,6 +441,11 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -440,6 +441,11 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto.setComment(comment); dto.setComment(comment);
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", operate); map.put("approvalStatus", operate);
if (!ObjectUtils.isEmpty(jgChangeRegistrationName.getInstanceStatus()) &&
(jgChangeRegistrationName.getInstanceStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getReject()) ||
jgChangeRegistrationName.getInstanceStatus().equals(WorkFlowStatusEnum.UNIT_RENAME_SUBMIT.getRollBack()))) {
map.put("approvalStatus", "提交");
}
dto.setVariable(map); dto.setVariable(map);
//执行流程 //执行流程
Workflow.taskClient.completeByTask(taskId, dto); Workflow.taskClient.completeByTask(taskId, dto);
......
...@@ -304,49 +304,6 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR ...@@ -304,49 +304,6 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
} }
this.getBaseMapper().updateById(jgChangeRegistrationReform); this.getBaseMapper().updateById(jgChangeRegistrationReform);
} }
// public String flowExecute(Long id, String instanceId, String operate, String comment, Boolean update) {
// String role = "";
// String taskName = "流程结束";
// ArrayList<String> roleList = new ArrayList<>();
// try {
// JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId);
// JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data")));
// String taskId = taskMessage.getString("id");
// //组装信息
// TaskResultDTO dto = new TaskResultDTO();
// dto.setResultCode("approvalStatus");
// dto.setTaskId(taskId);
// dto.setComment(comment);
// HashMap<String, Object> map = new HashMap<>();
// map.put("approvalStatus", operate);
// dto.setVariable(map);
// //执行流程
// Workflow.taskClient.completeByTask(taskId, dto);
// // 查询下节点任务
// JSONObject taskNoAuth = workFlowFeginService.getTaskNoAuth(instanceId);
// if (!ObjectUtils.isEmpty(taskNoAuth.get("data"))) {
// JSONObject nextTask = JSON.parseObject(JSON.toJSONString(taskNoAuth.get("data")));
// String nextTaskId = nextTask.getString("id");
// taskName = nextTask.getString("name");
// AjaxResult taskGroupName = Workflow.taskClient.getTaskGroupName(nextTaskId);
// JSONArray data = JSON.parseArray(JSON.toJSONString(taskGroupName.get("data")));
// for (Object datum : data) {
// if (((Map) datum).containsKey("groupId")) {
// roleList.add(((Map) datum).get("groupId").toString());
// }
// }
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
// role = String.join(",", roleList);
// if (update) {
// Boolean rollBack = "1".equals(operate) ? true : false;
// updateStatus(id, instanceId, taskName, role, rollBack);
// }
// return role;
// }
public void flowExecute(Long id, String instanceId, String operate, String comment) { public void flowExecute(Long id, String instanceId, String operate, String comment) {
try { try {
...@@ -361,6 +318,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR ...@@ -361,6 +318,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
dto.setComment(comment); dto.setComment(comment);
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", operate); map.put("approvalStatus", operate);
//2023年12月27日16点33分 流程状态为起草人撤回或者一级审批驳回时需要将提交时的已同意修改为已提交
if(!ObjectUtils.isEmpty(jgChangeRegistrationReform)&&(jgChangeRegistrationReform.getStatus().equals(WorkFlowStatusEnum.CHANGE_SUBMIT.getRollBack())||jgChangeRegistrationReform.getStatus().equals(WorkFlowStatusEnum.CHANGE_SUBMIT.getReject()))){ if(!ObjectUtils.isEmpty(jgChangeRegistrationReform)&&(jgChangeRegistrationReform.getStatus().equals(WorkFlowStatusEnum.CHANGE_SUBMIT.getRollBack())||jgChangeRegistrationReform.getStatus().equals(WorkFlowStatusEnum.CHANGE_SUBMIT.getReject()))){
map.put("approvalStatus", "提交"); map.put("approvalStatus", "提交");
} }
...@@ -374,36 +332,6 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR ...@@ -374,36 +332,6 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
updateExecuteIds(instanceId, id, operate); updateExecuteIds(instanceId, id, operate);
} }
// public void updateStatus(Long id, String instanceId, String taskName, String role, Boolean rollBack) {
// ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// LambdaQueryWrapper<JgChangeRegistrationReform> lambda = new QueryWrapper<JgChangeRegistrationReform>().lambda();
// lambda.eq(JgChangeRegistrationReform::getSequenceNbr, id);
// JgChangeRegistrationReform jgChangeRegistrationReform = this.getBaseMapper().selectOne(lambda);
// if ("流程结束".equals(taskName)) {
// JgChangeRegistrationReformEq jgChangeRegistrationReformEq = jgChangeRegistrationReformEqMapper.selectOne(new QueryWrapper<JgChangeRegistrationReformEq>().eq("equip_transfer_id", jgChangeRegistrationReform.getSequenceNbr()));
// jgChangeRegistrationReform.setStatus("已完成");
// jgChangeRegistrationReform.setAuditStatus(RenovationRegistrationWorkFlowStatusEnum.COMPLETE.getName());
//
// //交换历史数据与新增数据
// updateTechparamsByEquIdAndCurrentDoucumentId(jgChangeRegistrationReformEq.getEquId(), jgChangeRegistrationReform.getSequenceNbr().toString(), jgChangeRegistrationReform.getSupervisoryCode());
// } else {
// jgChangeRegistrationReform.setNextExecutorIds(role);
// jgChangeRegistrationReform.setPromoter(reginParams.getUserModel().getUserId());
// if (!ObjectUtils.isEmpty(jgChangeRegistrationReform.getInstanceStatus())) {
// jgChangeRegistrationReform.setInstanceStatus(jgChangeRegistrationReform.getInstanceStatus() + "," + role);
// } else {
// jgChangeRegistrationReform.setInstanceStatus(role);
// }
// }
// if (rollBack) {
// jgChangeRegistrationReform.setAuditStatus(RenovationRegistrationWorkFlowStatusEnum.getMessage(taskName).getReject());
// this.getBaseMapper().update(jgChangeRegistrationReform, lambda);
// this.getBaseMapper().updatePromoter(jgChangeRegistrationReform.getSequenceNbr());
// } else {
// jgChangeRegistrationReform.setAuditStatus(RenovationRegistrationWorkFlowStatusEnum.getMessage(taskName).getPass());
// this.getBaseMapper().update(jgChangeRegistrationReform, lambda);
// }
// }
public void withdraw(String instanceId) { public void withdraw(String instanceId) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
......
...@@ -654,6 +654,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg ...@@ -654,6 +654,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
} }
} else { } else {
jgChangeRegistrationUnit.setPromoter(""); jgChangeRegistrationUnit.setPromoter("");
jgChangeRegistrationUnit.setNextExecutorIds(String.join(",", roleList));
jgChangeRegistrationUnit.setStatus(WorkFlowStatusEnum.getMessage(taskName[0]).getReject()); jgChangeRegistrationUnit.setStatus(WorkFlowStatusEnum.getMessage(taskName[0]).getReject());
} }
JgChangeRegistrationUnitMapper.updateById(jgChangeRegistrationUnit); JgChangeRegistrationUnitMapper.updateById(jgChangeRegistrationUnit);
......
...@@ -140,6 +140,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -140,6 +140,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
public void flowExecute(Long id, String instanceId, String operate, String comment) { public void flowExecute(Long id, String instanceId, String operate, String comment) {
try { try {
JgEnableDisable jgEnableDisable = this.baseMapper.selectById(id);
JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId); JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId);
JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data"))); JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data")));
String taskId = taskMessage.getString("id"); String taskId = taskMessage.getString("id");
...@@ -150,6 +151,9 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto, ...@@ -150,6 +151,9 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
dto.setComment(comment); dto.setComment(comment);
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", operate); map.put("approvalStatus", operate);
if (WorkFlowStatusEnum.ENABLE_SUBMIT.getReject().equals(jgEnableDisable.getAuditStatus()) || WorkFlowStatusEnum.ENABLE_SUBMIT.getRollBack().equals(jgEnableDisable.getAuditStatus())) {
map.put("approvalStatus", "提交");
}
dto.setVariable(map); dto.setVariable(map);
//执行流程 //执行流程
Workflow.taskClient.completeByTask(taskId, dto); Workflow.taskClient.completeByTask(taskId, dto);
......
...@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...@@ -304,6 +305,8 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto, ...@@ -304,6 +305,8 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
String userId = RequestContext.getExeUserId(); String userId = RequestContext.getExeUserId();
JgEquipTransfer jgEquipTransfer = this.baseMapper.selectById(jgEquipTransferDto.getSequenceNbr()); JgEquipTransfer jgEquipTransfer = this.baseMapper.selectById(jgEquipTransferDto.getSequenceNbr());
jgEquipTransfer.setProcessAdvice(jgEquipTransferDto.getProcessAdvice()); jgEquipTransfer.setProcessAdvice(jgEquipTransferDto.getProcessAdvice());
JgEquipTransferEq jgEquipTransferEq = jgEquipTransferEqMapper.selectOne(Wrappers.<JgEquipTransferEq>lambdaQuery().select(JgEquipTransferEq::getEquId)
.eq(JgEquipTransferEq::getEquipTransferId, jgEquipTransferDto.getSequenceNbr()));
ArrayList<String> roleList = new ArrayList<>(); ArrayList<String> roleList = new ArrayList<>();
boolean submit = submit(jgEquipTransfer, op); boolean submit = submit(jgEquipTransfer, op);
...@@ -315,6 +318,14 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto, ...@@ -315,6 +318,14 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
if (roleList.isEmpty()) { if (roleList.isEmpty()) {
jgEquipTransfer.setApplyStatus(String.valueOf(FlowStatusEnum.TO_BE_FINISHED.getCode())); jgEquipTransfer.setApplyStatus(String.valueOf(FlowStatusEnum.TO_BE_FINISHED.getCode()));
jgEquipTransfer.setPromoter(""); jgEquipTransfer.setPromoter("");
if (jgEquipTransferEq != null){
Map<String,Map<String,Object>> resultMap = new HashMap<>();
Map<String,Object> esParamMap =new HashMap<>();
esParamMap.put("USC_UNIT_NAME", jgEquipTransfer.getInstallUnitName());
esParamMap.put("USC_UNIT_CREDIT_CODE", jgEquipTransfer.getInstallUnitName());
resultMap.put(jgEquipTransferEq.getEquId(),esParamMap);
tzsServiceFeignClient.commonUpdateEsDataByIds(resultMap);
}
} else { } else {
jgEquipTransfer.setNextExecuteIds(String.join(",", roleList)); jgEquipTransfer.setNextExecuteIds(String.join(",", roleList));
if (!ObjectUtils.isEmpty(jgEquipTransfer.getInstanceStatus())) { if (!ObjectUtils.isEmpty(jgEquipTransfer.getInstanceStatus())) {
......
...@@ -780,6 +780,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -780,6 +780,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// 使用信息表更新是否西咸 // 使用信息表更新是否西咸
IdxBizJgUseInfo useInfo = useInfoService.getOneData(jgRelationEquip.getEquId()); IdxBizJgUseInfo useInfo = useInfoService.getOneData(jgRelationEquip.getEquId());
if (!ObjectUtils.isEmpty(useInfo)) { if (!ObjectUtils.isEmpty(useInfo)) {
useInfo.setUseUnitCreditCode(jgInstallationNotice.getUseUnitCreditCode());
useInfo.setUseUnitName(jgInstallationNotice.getUseUnitName());
useInfo.setIsNotXiXian(jgInstallationNotice.getIsXixian() == null ? "0" : jgInstallationNotice.getIsXixian()); useInfo.setIsNotXiXian(jgInstallationNotice.getIsXixian() == null ? "0" : jgInstallationNotice.getIsXixian());
useInfoService.saveOrUpdateData(useInfo); useInfoService.saveOrUpdateData(useInfo);
} }
......
...@@ -133,8 +133,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC ...@@ -133,8 +133,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
return maintenanceContractMapper.updateBySequenceNbr(dto); return maintenanceContractMapper.updateBySequenceNbr(dto);
} }
public void flowExecute(Long id,String instanceId, String operate, String comment, Boolean update) { public void flowExecute(Long id, String instanceId, String operate, String comment, Boolean update) {
try { try {
JgMaintenanceContract jgMaintenanceContract = this.getBaseMapper().selectById(id);
JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId); JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId);
JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data"))); JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data")));
String taskId = taskMessage.getString("id"); String taskId = taskMessage.getString("id");
...@@ -145,6 +146,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC ...@@ -145,6 +146,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
dto.setComment(comment); dto.setComment(comment);
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", operate); map.put("approvalStatus", operate);
if (WorkFlowStatusEnum.MAIN_SUBMIT.getReject().equals(jgMaintenanceContract.getStatus()) || WorkFlowStatusEnum.MAIN_SUBMIT.getRollBack().equals(jgMaintenanceContract.getStatus())) {
map.put("approvalStatus", "提交");
}
dto.setVariable(map); dto.setVariable(map);
//执行流程 //执行流程
Workflow.taskClient.completeByTask(taskId, dto); Workflow.taskClient.completeByTask(taskId, dto);
......
...@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; ...@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto; import com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancel; import com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancel;
import com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancelEq; import com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancelEq;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.yeejoin.amos.boot.module.jg.api.enums.CancelTypeEnum; import com.yeejoin.amos.boot.module.jg.api.enums.CancelTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum; import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelEqMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelEqMapper;
...@@ -443,6 +444,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc ...@@ -443,6 +444,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
public void flowExecute(Long id, String instanceId, String operate, String comment) { public void flowExecute(Long id, String instanceId, String operate, String comment) {
try { try {
JgScrapCancel jgScrapCancel = this.getBaseMapper().selectById(id);
JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId); JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId);
JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data"))); JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data")));
String taskId = taskMessage.getString("id"); String taskId = taskMessage.getString("id");
...@@ -453,6 +455,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc ...@@ -453,6 +455,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
dto.setComment(comment); dto.setComment(comment);
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", operate); map.put("approvalStatus", operate);
if (!ObjectUtils.isEmpty(jgScrapCancel.getInstanceStatus()) &&
(jgScrapCancel.getInstanceStatus().equals(WorkFlowStatusEnum.CANCEL_SUBMIT.getReject()) ||
jgScrapCancel.getInstanceStatus().equals(WorkFlowStatusEnum.CANCEL_SUBMIT.getRollBack()))) {
map.put("approvalStatus", "提交");
}
dto.setVariable(map); dto.setVariable(map);
//执行流程 //执行流程
Workflow.taskClient.completeByTask(taskId, dto); Workflow.taskClient.completeByTask(taskId, dto);
...@@ -541,7 +548,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc ...@@ -541,7 +548,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
map1.put("ORG_BRANCH_NAME", ""); map1.put("ORG_BRANCH_NAME", "");
} }
resultMap.put(jgScrapCancelEq.getEquId(), map1); resultMap.put(jgScrapCancelEq.getEquId(), map1);
tzsServiceFeignClient.commonUpdateEsDataByIds(resultMap); try {
tzsServiceFeignClient.commonUpdateEsDataByIds(resultMap);
} catch (Exception e) {
e.printStackTrace();
}
jgScrapCancel.setAuditStatus(FlowStatusEnum.TO_BE_FINISHED.getName()); jgScrapCancel.setAuditStatus(FlowStatusEnum.TO_BE_FINISHED.getName());
jgScrapCancel.setAuditPassDate(new Date()); jgScrapCancel.setAuditPassDate(new Date());
} }
......
...@@ -548,7 +548,12 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto ...@@ -548,7 +548,12 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
dto.setTaskId(taskId); dto.setTaskId(taskId);
dto.setComment("提交流程"); dto.setComment("提交流程");
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", op); if(notice.getNoticeStatus().equals("6614") || notice.getNoticeStatus().equals("6615") ) {
map.put("approvalStatus", "提交");
} else {
map.put("approvalStatus", op);
}
dto.setVariable(map); dto.setVariable(map);
//执行流程 //执行流程
AjaxResult ajaxResult1 = null; AjaxResult ajaxResult1 = null;
......
...@@ -324,6 +324,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -324,6 +324,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
public void flowExecute(Long id, String instanceId, String operate, String comment) { public void flowExecute(Long id, String instanceId, String operate, String comment) {
try { try {
JgUseRegistration jgUseRegistration = this.getBaseMapper().selectById(id);
JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId); JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId);
JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data"))); JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data")));
String taskId = taskMessage.getString("id"); String taskId = taskMessage.getString("id");
...@@ -334,6 +335,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -334,6 +335,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
dto.setComment(comment); dto.setComment(comment);
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("approvalStatus", operate); map.put("approvalStatus", operate);
if (jgUseRegistration.getStatus().equals(WorkFlowStatusEnum.USE_SUBMIT.getReject()) || jgUseRegistration.getStatus().equals(WorkFlowStatusEnum.USE_SUBMIT.getRollBack())) {
map.put("approvalStatus", "提交");
}
dto.setVariable(map); dto.setVariable(map);
//执行流程 //执行流程
Workflow.taskClient.completeByTask(taskId, dto); Workflow.taskClient.completeByTask(taskId, dto);
......
...@@ -328,7 +328,6 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -328,7 +328,6 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
jyjcOpeningApplicationModel = new JyjcOpeningApplicationModel(); jyjcOpeningApplicationModel = new JyjcOpeningApplicationModel();
unitCode = reginParams.getCompany().getCompanyCode(); unitCode = reginParams.getCompany().getCompanyCode();
} }
// unitCode = "91611103MAC4Q1EG7B"; // 测试用,之后务必删除!!!
QueryWrapper enterpriseInfoQueryWrapper = new QueryWrapper<>(); QueryWrapper enterpriseInfoQueryWrapper = new QueryWrapper<>();
enterpriseInfoQueryWrapper.eq("use_code", unitCode); enterpriseInfoQueryWrapper.eq("use_code", unitCode);
TzBaseEnterpriseInfo baseUnitLicenceEntity = enterpriseInfoMapper.selectOne(enterpriseInfoQueryWrapper); TzBaseEnterpriseInfo baseUnitLicenceEntity = enterpriseInfoMapper.selectOne(enterpriseInfoQueryWrapper);
...@@ -363,7 +362,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -363,7 +362,10 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// 获取检验人员信息 // 获取检验人员信息
QueryWrapper userInfoQueryWrapper = new QueryWrapper<>(); QueryWrapper userInfoQueryWrapper = new QueryWrapper<>();
userInfoQueryWrapper.eq("unit_code", unitCode); userInfoQueryWrapper.eq("unit_code", unitCode);
userInfoQueryWrapper.eq("is_delete", false); if (StringUtils.isBlank(jyjcOpeningApplicationModel.getWorkflowProstanceId())) {
// 如果未开启流程则只查询未被删除的用户
userInfoQueryWrapper.eq("is_delete", false);
}
List<TzsUserInfo> userInfos = userInfoMapper.selectList(userInfoQueryWrapper); List<TzsUserInfo> userInfos = userInfoMapper.selectList(userInfoQueryWrapper);
if (!ValidationUtil.isEmpty(userInfos)) { if (!ValidationUtil.isEmpty(userInfos)) {
// List<String> codes = userInfos.stream() // List<String> codes = userInfos.stream()
......
spring.application.name=TZS-JYJC-YY spring.application.name=TZS-JYJC
server.servlet.context-path=/jyjc server.servlet.context-path=/jyjc
server.port=12000 server.port=12000
spring.profiles.active=dev spring.profiles.active=dev
......
...@@ -95,7 +95,6 @@ ...@@ -95,7 +95,6 @@
CONSTRUCTION_TYPE, CONSTRUCTION_TYPE,
USC_UNIT_CREDIT_CODE, USC_UNIT_CREDIT_CODE,
USC_UNIT_NAME, USC_UNIT_NAME,
DATE_FORMAT(USC_DATE, '%Y-%m-%d %H:%i:%s') as USC_DATE,
EQU_DEFINE, EQU_DEFINE,
EQU_DEFINE_CODE, EQU_DEFINE_CODE,
PRODUCT_NAME, PRODUCT_NAME,
......
...@@ -2471,6 +2471,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -2471,6 +2471,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
if(paramMap.isEmpty()){ if(paramMap.isEmpty()){
return null; return null;
} }
String oldUscUnitCreditCode = "";
String oldUscUnitName = "";
Map<String, Object> resultMap = new HashMap<>(); Map<String, Object> resultMap = new HashMap<>();
for (Map.Entry<String, Map<String, Object>> entry : paramMap.entrySet()) { for (Map.Entry<String, Map<String, Object>> entry : paramMap.entrySet()) {
String record = entry.getKey(); String record = entry.getKey();
...@@ -2481,15 +2483,22 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -2481,15 +2483,22 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
Optional<ESEquipmentCategoryDto> optional = esEquipmentCategory.findById(record); Optional<ESEquipmentCategoryDto> optional = esEquipmentCategory.findById(record);
if(!ObjectUtils.isEmpty(optional)){ if(!ObjectUtils.isEmpty(optional)){
oldData = optional.get(); oldData = optional.get();
oldUscUnitCreditCode = oldData.getUSC_UNIT_CREDIT_CODE();
oldUscUnitName = oldData.getUSC_UNIT_NAME();
} }
//获取Es中新的参数 //获取Es中新的参数
ESEquipmentCategoryDto newData = JSON.parseObject(toJSONString(childMap), ESEquipmentCategoryDto.class); ESEquipmentCategoryDto newData = JSON.parseObject(toJSONString(childMap), ESEquipmentCategoryDto.class);
String newUscUnitCreditCode = newData.getUSC_UNIT_CREDIT_CODE();
String newUscUnitName = newData.getUSC_UNIT_NAME();
//删除Es中旧的数据 //删除Es中旧的数据
if (!ObjectUtils.isEmpty(oldData)) { if (!ObjectUtils.isEmpty(oldData)) {
esEquipmentCategory.deleteById(record); esEquipmentCategory.deleteById(record);
//整合新旧数据 //整合新旧数据
Bean.copyExistPropertis(newData, oldData); Bean.copyExistPropertis(newData, oldData);
//处理施工单位信息
oldData.setUSC_UNIT_CREDIT_CODE(oldUscUnitCreditCode+","+newUscUnitCreditCode);
oldData.setUSC_UNIT_NAME(oldUscUnitName+","+newUscUnitName);
} }
if (!ObjectUtils.isEmpty(oldData)) { if (!ObjectUtils.isEmpty(oldData)) {
oldData.setREC_DATE(System.currentTimeMillis()); oldData.setREC_DATE(System.currentTimeMillis());
......
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