Commit 41b501ce authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents 4a20151a 4d688fb1
...@@ -68,7 +68,9 @@ import java.math.BigDecimal; ...@@ -68,7 +68,9 @@ import java.math.BigDecimal;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer; import java.util.function.Consumer;
...@@ -1501,12 +1503,10 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind ...@@ -1501,12 +1503,10 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
List<String> times = new ArrayList<>(); List<String> times = new ArrayList<>();
Date currentDate = new Date(); Date currentDate = new Date();
for (int i =0; i < 30; i++) { for (int i =0; i < 30; i++) {
Date date = new Date(currentDate.getTime() - i * 24 * 60 * 60 * 1000); times.add(LocalDate.now().minusDays(i).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
times.add(sdf.format(date));
} }
Date date = new Date(currentDate.getTime() - 29 * 24 * 60 * 60 * 1000); List<CylinderFillingRecordStatisticsDto> fillingRecord = baseMapper.queryFillingRecordByOrgCode(orgCode, LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
List<CylinderFillingRecordStatisticsDto> fillingRecord = baseMapper.queryFillingRecordByOrgCode(orgCode, sdf.format(date)); List<CylinderFillingRecordStatisticsDto> offloading = baseMapper.queryoffloadingByOrgCode(orgCode, LocalDate.now().minusDays(29).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
List<CylinderFillingRecordStatisticsDto> offloading = baseMapper.queryoffloadingByOrgCode(orgCode, sdf.format(date));
if (fillingRecord == null) { if (fillingRecord == null) {
fillingRecord = new ArrayList<>(0); fillingRecord = new ArrayList<>(0);
} }
......
package com.yeejoin.amos.boot.module.jg.api.dto; package com.yeejoin.amos.boot.module.jg.api.dto;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import com.yeejoin.amos.boot.module.jg.api.common.BizCustomDateSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -51,6 +55,8 @@ public class JgScrapCancelDto extends BaseDto { ...@@ -51,6 +55,8 @@ public class JgScrapCancelDto extends BaseDto {
private String createUserId; private String createUserId;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonSerialize(using = BizCustomDateSerializer.class)
private Date createDate; private Date createDate;
@ApiModelProperty(value = "流程状态") @ApiModelProperty(value = "流程状态")
......
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
DATE_FORMAT(tjsc.audit_pass_date,'%Y-%m-%d') as auditPassDate, DATE_FORMAT(tjsc.audit_pass_date,'%Y-%m-%d') as auditPassDate,
tjsc.use_unit_name, tjsc.use_unit_name,
tjsc.use_unit_code, tjsc.use_unit_code,
tjsc.use_registration_code tjsc.use_registration_code,
tjsc.equ_list_code
from tzs_jg_scrap_cancel tjsc from tzs_jg_scrap_cancel tjsc
<where> <where>
tjsc.is_delete = 0 tjsc.is_delete = 0
...@@ -58,7 +59,7 @@ ...@@ -58,7 +59,7 @@
</if> </if>
<if test="dto.useRegistrationCode != null and dto.useRegistrationCode != ''"> <if test="dto.useRegistrationCode != null and dto.useRegistrationCode != ''">
AND tjsc."USE_ORG_CODE" like concat('%',#{dto.useRegistrationCode},'%') AND tjsc."use_registration_code" like concat('%',#{dto.useRegistrationCode},'%')
</if> </if>
<if test="roleIds != null and dto.type == 'supervision'"> <if test="roleIds != null and dto.type == 'supervision'">
<foreach collection='roleIds' item='role' open='and (' close=')' separator='or'> <foreach collection='roleIds' item='role' open='and (' close=')' separator='or'>
......
...@@ -442,7 +442,16 @@ ...@@ -442,7 +442,16 @@
<include refid="page-list-pipeline"/> <include refid="page-list-pipeline"/>
WHERE WHERE
ri."EQU_CATEGORY" = '8300' ri."EQU_CATEGORY" = '8300'
<if test="jsonObject.DATA_SOURCE != null and jsonObject.DATA_SOURCE != 'jg_his'">
and ui."DATA_SOURCE" like 'jg%' and ui."DATA_SOURCE" like 'jg%'
and ui."DATA_SOURCE" not like 'jg_his%'
</if>
<if test="jsonObject.DATA_SOURCE != null and jsonObject.DATA_SOURCE == 'jg_his'">
and ui."DATA_SOURCE" like 'jg_his%'
</if>
<if test="jsonObject.DATA_SOURCE == null or jsonObject.DATA_SOURCE == ''">
and ui."DATA_SOURCE" like 'jg%'
</if>
-- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备 -- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null"> <if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null">
and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode} and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode}
...@@ -506,6 +515,16 @@ ...@@ -506,6 +515,16 @@
ri."EQU_CATEGORY" = '2300' ri."EQU_CATEGORY" = '2300'
and ui."DATA_SOURCE" like 'jg%' and ui."DATA_SOURCE" like 'jg%'
and (ri.whether_vehicle_cylinder is null or ri.whether_vehicle_cylinder != 1) and (ri.whether_vehicle_cylinder is null or ri.whether_vehicle_cylinder != 1)
<if test="jsonObject.DATA_SOURCE != null and jsonObject.DATA_SOURCE != 'jg_his'">
and ui."DATA_SOURCE" like 'jg%'
and ui."DATA_SOURCE" not like 'jg_his%'
</if>
<if test="jsonObject.DATA_SOURCE != null and jsonObject.DATA_SOURCE == 'jg_his'">
and ui."DATA_SOURCE" like 'jg_his%'
</if>
<if test="jsonObject.DATA_SOURCE == null or jsonObject.DATA_SOURCE == ''">
and ui."DATA_SOURCE" like 'jg%'
</if>
-- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备 -- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null"> <if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null">
and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode} and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode}
...@@ -531,7 +550,7 @@ ...@@ -531,7 +550,7 @@
WHERE WHERE
ri."EQU_DEFINE" = '23T0' ri."EQU_DEFINE" = '23T0'
and ui."DATA_SOURCE" like 'jg%' and ui."DATA_SOURCE" like 'jg%'
and ui."DATA_SOURCE" not like 'jg_his%' -- and ui."DATA_SOURCE" not like 'jg_his%'
and ri.whether_vehicle_cylinder = 1 and ri.whether_vehicle_cylinder = 1
-- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备 -- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null"> <if test="jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null">
......
...@@ -110,19 +110,19 @@ public class IdxBizJqEquipmentRegisterController extends BaseController { ...@@ -110,19 +110,19 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
JSONObject jsonObject = new JSONObject(map); JSONObject jsonObject = new JSONObject(map);
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForEquipmentRegisterPage(jsonObject)); return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForEquipmentRegisterPage(jsonObject));
} }
/** // /**
* 查询设备注册列表 // * 查询设备注册列表
* // *
* @param map // * @param map
* @return // * @return
*/ // */
@TycloudOperation(ApiLevel = UserType.AGENCY) // @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/pageHistory") // @GetMapping(value = "/pageHistory")
@ApiOperation(httpMethod = "GET", value = "设备注册信息分页查询", notes = "设备注册信息分页查询") // @ApiOperation(httpMethod = "GET", value = "设备注册信息分页查询", notes = "设备注册信息分页查询")
public ResponseModel<Page<JSONObject>> queryForPageHistory(@RequestParam Map<String, Object> map) { // public ResponseModel<Page<JSONObject>> queryForPageHistory(@RequestParam Map<String, Object> map) {
JSONObject jsonObject = new JSONObject(map); // JSONObject jsonObject = new JSONObject(map);
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForEquipmentRegisterPageHistory(jsonObject)); // return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryForEquipmentRegisterPageHistory(jsonObject));
} // }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/category/list") @GetMapping(value = "/category/list")
@ApiOperation(httpMethod = "GET", value = "查询不同单位类型可新增的设备种类列表", notes = "查询不同单位类型可新增的设备种类列表") @ApiOperation(httpMethod = "GET", value = "查询不同单位类型可新增的设备种类列表", notes = "查询不同单位类型可新增的设备种类列表")
......
...@@ -136,7 +136,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc ...@@ -136,7 +136,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
Page<JgScrapCancelDto> listPage = this.baseMapper.getListPage(page, sortMap, dto, roleIds, orgCode, currentUserId); Page<JgScrapCancelDto> listPage = this.baseMapper.getListPage(page, sortMap, dto, roleIds, orgCode, currentUserId);
listPage.getRecords().forEach(item -> { listPage.getRecords().forEach(item -> {
if (item.getCancelType() != null) { if (item.getCancelType() != null) {
item.setCancelType(CancelTypeEnum.getNameByType(item.getCancelType())); item.setCancelTypeDesc(CancelTypeEnum.getNameByType(item.getCancelType()));
} }
if (item.getEquListCode() != null) { if (item.getEquListCode() != null) {
item.setEquListName(EquipmentClassifityEnum.getNameByCode(item.getEquListCode())); item.setEquListName(EquipmentClassifityEnum.getNameByCode(item.getEquListCode()));
...@@ -264,7 +264,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc ...@@ -264,7 +264,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
String equListName = EquipmentClassifityEnum.getNameByCode(jsonObject.get("equListCode").toString()); String equListName = EquipmentClassifityEnum.getNameByCode(jsonObject.get("equListCode").toString());
save2HisData(jsonObject, jgScrapCancel.getSequenceNbr().toString()); save2HisData(jsonObject, jgScrapCancel.getSequenceNbr().toString());
JgScrapCancelDto dto = new JgScrapCancelDto(); JgScrapCancelDto dto = new JgScrapCancelDto();
BeanUtil.copyProperties(jgScrapCancel, new JgScrapCancelDto()); BeanUtil.copyProperties(jgScrapCancel, dto);
dto.setEquListName(equListName); dto.setEquListName(equListName);
return dto; return dto;
} }
......
...@@ -2476,11 +2476,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -2476,11 +2476,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 使用登记信息 // 使用登记信息
JgUseRegistration jgUseRegistration = new JgUseRegistration(); JgUseRegistration jgUseRegistration = new JgUseRegistration();
jgUseRegistration.setRegDate(new Date()); jgUseRegistration.setRegDate(new Date());
LambdaQueryWrapper<IdxBizJgOtherInfo> otherLambda = new QueryWrapper<IdxBizJgOtherInfo>().lambda();
otherLambda.eq(IdxBizJgOtherInfo::getRecord, map.get("equipId"));
IdxBizJgOtherInfo otherInfo = otherInfoMapper.selectOne(otherLambda);
String supervisoryCode = otherInfo.getSupervisoryCode();
jgUseRegistration.setSupervisoryCode(supervisoryCode);
if (!ObjectUtils.isEmpty(map.get("otherAccessories"))) { if (!ObjectUtils.isEmpty(map.get("otherAccessories"))) {
jgUseRegistration.setOtherAccessories(JSONObject.toJSONString(map.get("otherAccessories"))); jgUseRegistration.setOtherAccessories(JSONObject.toJSONString(map.get("otherAccessories")));
} }
...@@ -2587,7 +2583,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -2587,7 +2583,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper<IdxBizJgRegisterInfo> lambdaReg = new QueryWrapper<IdxBizJgRegisterInfo>().lambda(); LambdaQueryWrapper<IdxBizJgRegisterInfo> lambdaReg = new QueryWrapper<IdxBizJgRegisterInfo>().lambda();
lambdaReg.eq(IdxBizJgRegisterInfo::getRecord, jgRelationEquip.getEquId()); lambdaReg.eq(IdxBizJgRegisterInfo::getRecord, jgRelationEquip.getEquId());
IdxBizJgRegisterInfo registerInfo = idxBizJgRegisterInfoMapper.selectOne(lambdaReg); IdxBizJgRegisterInfo registerInfo = idxBizJgRegisterInfoMapper.selectOne(lambdaReg);
registerInfo.setUseOrgCode(ValidationUtil.isEmpty(map.get("useRegistrationCode")) ? "" : String.valueOf(map.get("useRegistrationCode"))); registerInfo.setUseOrgCode(jgUseRegistration.getUseRegistrationCode());
idxBizJgRegisterInfoMapper.updateById(registerInfo);
// 查询设备制造信息 // 查询设备制造信息
LambdaQueryWrapper<IdxBizJgFactoryInfo> factoryInfoWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<IdxBizJgFactoryInfo> factoryInfoWrapper = new LambdaQueryWrapper<>();
...@@ -2615,6 +2612,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -2615,6 +2612,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
useInfo.setEstateUnitCreditCode(String.valueOf(map.get("estateUnitName")).split("_")[0]); useInfo.setEstateUnitCreditCode(String.valueOf(map.get("estateUnitName")).split("_")[0]);
useInfo.setEstateUnitName(String.valueOf(map.get("estateUnitName")).split("_")[1]); useInfo.setEstateUnitName(String.valueOf(map.get("estateUnitName")).split("_")[1]);
useInfoMapper.updateById(useInfo); useInfoMapper.updateById(useInfo);
LambdaQueryWrapper<IdxBizJgOtherInfo> otherLambda = new QueryWrapper<IdxBizJgOtherInfo>().lambda();
otherLambda.eq(IdxBizJgOtherInfo::getRecord, map.get("equipId"));
IdxBizJgOtherInfo otherInfo = otherInfoMapper.selectOne(otherLambda);
// 生成监管码 96333码
this.createCode(map, jgUseRegistration, registerInfo, useInfo, otherInfo);
// 更新es // 更新es
updateEsData(usePlace, map, otherInfo, jgUseRegistration, map); updateEsData(usePlace, map, otherInfo, jgUseRegistration, map);
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
{ {
"name": "移装告知", "name": "移装告知",
"code": "GZ_YZ", "code": "GZ_YZ",
"image": "upload/tzs/common/image/移装告知.png" "image": "upload/tzs/common/image/移装告知.png",
"disabled": true
} }
], ],
"DJGL": [ "DJGL": [
...@@ -47,7 +48,8 @@ ...@@ -47,7 +48,8 @@
{ {
"name": "移装变更登记", "name": "移装变更登记",
"code": "DJ_YZ", "code": "DJ_YZ",
"image": "upload/tzs/common/image/移装变更登记.png" "image": "upload/tzs/common/image/移装变更登记.png",
"disabled": true
}, },
{ {
"name": "单位变更登记", "name": "单位变更登记",
...@@ -76,16 +78,6 @@ ...@@ -76,16 +78,6 @@
], ],
"QTBF": [ "QTBF": [
{ {
"name": "设备启用",
"code": "SB_QY",
"image": "upload/tzs/common/image/设备启用.png"
},
{
"name": "设备停用",
"code": "SB_TY",
"image": "upload/tzs/common/image/设备停用.png"
},
{
"name": "注销", "name": "注销",
"code": "BF_YZ", "code": "BF_YZ",
"image": "upload/tzs/common/image/移装报废.png" "image": "upload/tzs/common/image/移装报废.png"
...@@ -94,6 +86,18 @@ ...@@ -94,6 +86,18 @@
"name": "报废", "name": "报废",
"code": "BF_ZX", "code": "BF_ZX",
"image": "upload/tzs/common/image/注销报废.png" "image": "upload/tzs/common/image/注销报废.png"
},
{
"name": "设备启用",
"code": "SB_QY",
"image": "upload/tzs/common/image/设备启用.png",
"disabled": true
},
{
"name": "设备停用",
"code": "SB_TY",
"image": "upload/tzs/common/image/设备停用.png",
"disabled": true
} }
], ],
"XZSB": [ "XZSB": [
......
...@@ -236,37 +236,37 @@ ...@@ -236,37 +236,37 @@
{ {
"type": "113-1", "type": "113-1",
"pageType": "draft", "pageType": "draft",
"name": "移装注销", "name": "注销",
"url": "/mixuap?appId=1742358052905971713&id=1737357808040439809&roleIds={roleIds}&userId={userId}&pageType=edit" "url": "/mixuap?appId=1742358052905971713&id=1737357808040439809&roleIds={roleIds}&userId={userId}&pageType=edit"
}, },
{ {
"type": "113-1", "type": "113-1",
"pageType": "look", "pageType": "look",
"name": "移装注销", "name": "注销",
"url": "/mixuap?appId=1742358052905971713&id=1737357871097606146&roleIds={roleIds}&userId={userId}&pageType=look" "url": "/mixuap?appId=1742358052905971713&id=1737357871097606146&roleIds={roleIds}&userId={userId}&pageType=look"
}, },
{ {
"type": "113-1", "type": "113-1",
"pageType": "edit", "pageType": "edit",
"name": "移装注销", "name": "注销",
"url": "/mixuap?appId=1742358052905971713&id=1737357871097606146&roleIds={roleIds}&userId={userId}&pageType=edit" "url": "/mixuap?appId=1742358052905971713&id=1737357871097606146&roleIds={roleIds}&userId={userId}&pageType=edit"
}, },
{ {
"type": "113-2", "type": "113-2",
"pageType": "draft", "pageType": "draft",
"name": "报废注销", "name": "报废",
"url": "/mixuap?appId=1742358052905971713&id=1737357808040439809&roleIds={roleIds}&userId={userId}&pageType=edit" "url": "/mixuap?appId=1742358052905971713&id=1737357808040439809&roleIds={roleIds}&userId={userId}&pageType=edit"
}, },
{ {
"type": "113-2", "type": "113-2",
"pageType": "look", "pageType": "look",
"name": "报废注销", "name": "报废",
"url": "/mixuap?appId=1742358052905971713&id=1737357871097606146&roleIds={roleIds}&userId={userId}&pageType=look" "url": "/mixuap?appId=1742358052905971713&id=1737357871097606146&roleIds={roleIds}&userId={userId}&pageType=look"
}, },
{ {
"type": "113-2", "type": "113-2",
"pageType": "edit", "pageType": "edit",
"name": "报废注销", "name": "报废",
"url": "/mixuap?appId=1742358052905971713&id=1737357871097606146&roleIds={roleIds}&userId={userId}&pageType=edit" "url": "/mixuap?appId=1742358052905971713&id=1737357871097606146&roleIds={roleIds}&userId={userId}&pageType=edit"
}, },
{ {
......
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