Commit 6c219c90 authored by 刘林's avatar 刘林

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 357339b1 0da748cc
......@@ -130,5 +130,26 @@ public class UserPermissionDto {
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
protected Date recDate;
protected String recDate;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
protected String createDate;
/**
* 过滤使用-创建时间-开始
*/
@ApiModelProperty(value = "创建时间")
protected Date createDateStart;
/**
* 过滤使用-创建时间-结束
*/
@ApiModelProperty(value = "创建时间")
protected Date createDateEnd;
}
......@@ -304,4 +304,20 @@ public class TzBaseEnterpriseInfoDto extends BaseDto {
@ApiModelProperty(value = "单位所在城市Code")
private String cityCode;
@ApiModelProperty(value = "创建时间")
protected Date createDate;
/**
* 过滤使用-创建时间-开始
*/
@ApiModelProperty(value = "创建时间")
protected Date createDateStart;
/**
* 过滤使用-创建时间-结束
*/
@ApiModelProperty(value = "创建时间")
protected Date createDateEnd;
}
......@@ -187,4 +187,11 @@ public class TzBaseEnterpriseInfo extends BaseEntity {
@ApiModelProperty(value = "企业标签信息")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String regulatoryLabels;
/**
* 创建时间
*/
@TableField(value = "create_date")
protected Date createDate;
}
......@@ -140,7 +140,9 @@
</otherwise>
</choose>
</if>
<if test="tzBaseEnterpriseInfoDto.createDateStart != null and tzBaseEnterpriseInfoDto.createDateEnd != null">
and (create_date between #{tzBaseEnterpriseInfoDto.createDateStart} and #{tzBaseEnterpriseInfoDto.createDateEnd})
</if>
<if test="orgCodeList != null and !orgCodeList.isEmpty()">
AND (
<foreach collection="orgCodeList" item="item" separator=" OR ">
......
......@@ -25,16 +25,15 @@ import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* 企业数据信息
......@@ -189,8 +188,29 @@ public class TzBaseEnterpriseInfoController {
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public ResponseModel<IPage<TzBaseEnterpriseInfoDto>> page(PageParam pageParam,
@RequestParam(value = "sort", required = false) String sort,
@RequestParam Map<String, String> map) {
@RequestParam Map<String, Object> map) {
TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto = JSON.parseObject(JSON.toJSONString(map), TzBaseEnterpriseInfoDto.class);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (!ValidationUtil.isEmpty(map.get("createDateRange"))){
String createDateRangeObj = Objects.toString(map.get("createDateRange"));
String[] split = createDateRangeObj.replace("[", "").replace("]", "").split(",");
String startDateStr = split[0];
String endDateStr = split[1];
try {
Date startDate = sdf.parse(startDateStr);
Date endDate = sdf.parse(endDateStr);
Calendar calendar = Calendar.getInstance();
calendar.setTime(endDate);
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MILLISECOND, 999);
endDate = calendar.getTime();
tzBaseEnterpriseInfoDto.setCreateDateStart(startDate);
tzBaseEnterpriseInfoDto.setCreateDateEnd(endDate);
} catch (Exception e) {
}
}
return ResponseHelper.buildResponse(iTzBaseEnterpriseInfoService.page(pageParam, tzBaseEnterpriseInfoDto, sort));
}
......
......@@ -4,6 +4,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.biz.common.dto.KeyValueDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.jg.api.bo.JgBizCountDataBO;
......@@ -314,5 +315,10 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
String queryUnitCreditCodeBySeq(String unitSeq);
String queryUnitNameByCreditCode(String unitCreditCode);
List<CountDto> countBizNumAfterUseRegBatchEquip(@Param("records") List<String> records);
List<CountDto> countBizNumAfterUseRegBatchProjectContraption(@Param("projectContraptionIds") List<Long> projectContraptionIds);
}
......@@ -2543,6 +2543,7 @@
tzs_jg_change_registration_reform_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
UNION all
......@@ -2553,6 +2554,7 @@
tzs_jg_change_registration_transfer_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
UNION all
......@@ -2563,6 +2565,7 @@
tzs_jg_change_registration_unit_eq b
where
a.sequence_nbr = b.unit_change_registration_id
and a.is_delete = 0
and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '已作废')
UNION all
......@@ -2573,6 +2576,7 @@
tzs_jg_scrap_cancel_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
UNION all
......@@ -2586,6 +2590,7 @@
tzs_jg_change_registration_name n
where
n.sequence_nbr = e.name_change_registration_id
and n.is_delete = 0
and n.audit_status <![CDATA[ <> ]]> '使用单位待提交' and n.audit_status <![CDATA[ <> ]]> '已作废') ne
where
ne.record in (SELECT equ_id FROM "amos_tzs_biz"."tzs_jg_use_registration_eq" WHERE "equip_transfer_id" = #{equipTransferId})
......@@ -2835,4 +2840,217 @@
<select id="queryUnitNameByCreditCode" resultType="java.lang.String">
select use_unit from tz_base_enterprise_info where use_unit_code = #{unitCreditCode}
</select>
<select id="countBizNumAfterUseRegBatchEquip" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
select
sum(inUseNumber) longValue,
record as keyStr
from (
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_use_registration a,
tzs_jg_use_registration_eq b
where
a.sequence_nbr = b.equip_transfer_id
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and a.is_delete = 0
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废')
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_change_registration_reform a,
tzs_jg_change_registration_reform_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_change_registration_transfer a,
tzs_jg_change_registration_transfer_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_change_registration_unit a,
tzs_jg_change_registration_unit_eq b
where
a.sequence_nbr = b.unit_change_registration_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
b.equ_id as record
from
tzs_jg_scrap_cancel a,
tzs_jg_scrap_cancel_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and b.equ_id in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
and (a.audit_status <![CDATA[ <> ]]> '使用单位待提交' and a.audit_status <![CDATA[ <> ]]> '已作废')
group by b.equ_id
UNION all
select
count(1) as inUseNumber,
ne.record
from
(SELECT
json_array_elements(e.equip_info)->>'SEQUENCE_NBR' AS record
FROM
tzs_jg_change_registration_name_eq e,
tzs_jg_change_registration_name n
where
n.sequence_nbr = e.name_change_registration_id
and n.is_delete = 0
and n.audit_status <![CDATA[ <> ]]> '使用单位待提交' and n.audit_status <![CDATA[ <> ]]> '已作废') ne
where
ne.record in
<foreach collection="records" item="record" separator="," open="(" close=")">
#{record}
</foreach>
group by ne.record
)
group by record
</select>
<select id="countBizNumAfterUseRegBatchProjectContraption" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
select
sum(inUseNumber) longValue,
projectContraptionId as keyStr
from (
select
count(1) as inUseNumber,
a.project_contraption_id as projectContraptionId
from
tzs_jg_use_registration a,
tzs_jg_use_registration_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
and a.is_delete = 0
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废')
union all
select
count(1) as inUseNumber,
a.project_contraption_id as projectContraptionId
from
tzs_jg_maintain_notice a,
tzs_jg_maintain_notice_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6616')
and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
group by a.project_contraption_id
union all
select
count(1) as inUseNumber,
a.project_contraption_id as projectContraptionId
from
tzs_jg_reform_notice a,
tzs_jg_reform_notice_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and (a.notice_status <![CDATA[ <> ]]> '6617' AND a.notice_status <![CDATA[ <> ]]> '6616')
and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
group by a.project_contraption_id
union all
SELECT
count(1) as inUseNumber,
a.project_contraption_id as projectContraptionId
from
tzs_jg_change_registration_reform a,
tzs_jg_change_registration_reform_eq b
where
a.sequence_nbr = b.equip_transfer_id
and a.is_delete = 0
and ( a.audit_status <![CDATA[ <> ]]> '已作废' AND a.audit_status <![CDATA[ <> ]]> '已完成')
and a.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
group by a.project_contraption_id
union all
SELECT
count(1) as inUseNumber,
b.project_contraption_id as projectContraptionId
from
tzs_jg_change_registration_unit a,
tzs_jg_change_registration_unit_eq b
where
a.sequence_nbr = b.unit_change_registration_id
and (a.status <![CDATA[ <> ]]> '已作废' AND a.status <![CDATA[ <> ]]> '已完成')
and a.is_delete = 0
and b.project_contraption_id in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
group by b.project_contraption_id
union all
SELECT
count(1) as inUseNumber,
pc.sequence_nbr as projectContraptionId
from
tzs_jg_change_registration_name_eq e,
tzs_jg_change_registration_name n,
tzs_jg_use_registration_manage m,
idx_biz_jg_project_contraption pc
where
n.sequence_nbr = e.name_change_registration_id
and e.certificate_seq = m.sequence_nbr
and n.is_delete = 0
and pc.use_registration_code = m.use_registration_code
and m.equ_list_code ='8000'
and n.audit_status <![CDATA[ <> ]]> '使用单位待提交' and n.audit_status <![CDATA[ <> ]]> '已作废'
AND pc.sequence_nbr in
<foreach collection="projectContraptionIds" item="projectContraptionId" separator="," open="(" close=")">
#{projectContraptionId}
</foreach>
group by pc.sequence_nbr
)
group by projectContraptionId
</select>
</mapper>
......@@ -294,7 +294,7 @@ public class JgTableDataExportController extends BaseController {
@PostMapping(value = "/userInfoExportWithAdmin")
@ApiOperation(httpMethod = "POST", value = "基础设置-监管单位-人员信息列表数据导出", notes = "基础设置-监管单位-人员信息列表数据导出")
public ResponseModel<String> userInfoExportWithAdmin(@RequestParam(value = "ids", required = false) String ids,
@RequestBody Map<String, String> map) {
@RequestBody Map<String, Object> map) {
String uuid = UUID.randomUUID().toString();
iJgTableDataExportService.startDownLoadMsg("人员信息列表", uuid);
RequestContextWrapper contextWrapper = RequestContextWrapper.capture();
......
......@@ -28,7 +28,7 @@ public class DiffUtils {
public static boolean compare(String type, String newValue, String oldValue) {
if (isNullOrEmpty(newValue) && isNullOrEmpty(oldValue)) return true;
if (isNullOrEmpty(newValue) || isNullOrEmpty(oldValue)) return true;
if (isNullOrEmpty(newValue) || isNullOrEmpty(oldValue)) return false;
if (type == null) {
return Objects.equals(newValue, oldValue);
}
......
......@@ -63,5 +63,5 @@ public interface IJgTableDataExportService {
void userInfoExport(String uuid, String ids, Map<String, Object> map);
void userInfoExportWithAdmin(String uuid, String ids, Map<String, String> map);
void userInfoExportWithAdmin(String uuid, String ids, Map<String, Object> map);
}
......@@ -3192,4 +3192,14 @@ public class CommonServiceImpl implements ICommonService {
result.put("dataQualityScore", String.valueOf(remindServiceImpl.getReminderLevel(bizId, businessTypeEnum.name())));
}
public static String genRegTypeByDataSource(String dataSource) {
if (dataSource.contains("jg_his_black")) {
return "2";
} else if (dataSource.contains("jg_his")) {
return "1";
} else {
return "0";
}
}
}
\ No newline at end of file
......@@ -15,6 +15,8 @@ import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQu
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
......@@ -24,6 +26,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import com.yeejoin.amos.boot.module.jg.biz.core.BaseEntityService;
......@@ -135,6 +138,8 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
private RedisUtils redisUtils;
@Autowired
private JgUseRegistrationManageServiceImpl registrationManageService;
@Autowired
private CommonMapper commonMapper;
@Override
public boolean saveOrUpdateData(IdxBizJgProjectContraption projectContraption) {
......@@ -348,7 +353,9 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
IPage<IdxBizJgProjectContraption> pageList = queryWrapper.page(page);
// 单位类型区分的企业还是监管
String companyType2 = CommonServiceImpl.getCompanyType(company);
if (!ValidationUtil.isEmpty(pageList.getRecords())) {
Map<String, Boolean> projectContraptionUseMap = getPidUseMap(pageList);
pageList.getRecords().forEach(record -> {
BigDecimal pipelineLength = BigDecimal.valueOf(record.getPipelineLength());
BigDecimal roundedValue = pipelineLength.setScale(3, RoundingMode.HALF_UP);
......@@ -362,6 +369,10 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
.collect(Collectors.joining())
);
record.setCompanyType(companyType2);
// 来源类型:前端控制编辑按钮显示隐藏
record.setRegType(CommonServiceImpl.genRegTypeByDataSource(record.getDataSource()));
// 设置是否发生过后续业务::前端控制编辑按钮显示隐藏
record.setHappenAfterBiz(projectContraptionUseMap.getOrDefault(record.getProjectContraptionNo(), false));
});
List<Long> projectContraptionIdList = pageList.getRecords().stream().map(IdxBizJgProjectContraption::getSequenceNbr).collect(Collectors.toList());
......@@ -375,6 +386,16 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
return pageList;
}
/**
* 按照装置id查询 是否做过后续业务
* @param pageList 装置集合
* @return key-装置id;value-true(发生后续业务)、false(未发生后续业务)
*/
private Map<String, Boolean> getPidUseMap(IPage<IdxBizJgProjectContraption> pageList) {
List<CountDto> useCount = commonMapper.countBizNumAfterUseRegBatchProjectContraption(pageList.getRecords().stream().map(BaseEntity::getSequenceNbr).collect(Collectors.toList()));
return useCount.stream().collect(Collectors.toMap(CountDto::getKeyStr, e->e.getLongValue() > 0));
}
private SFunction<IdxBizJgProjectContraption, ?> resolveField(String field) {
switch (field) {
......
......@@ -19,6 +19,7 @@ import com.google.common.base.Joiner;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.*;
......@@ -2889,6 +2890,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
)
);
}
// 获取是否发生过后续业务集合
Map<String, Boolean> afterBizMap = getHasHappenAfterBiz(equIds);
// 更新设备使用情况和设备地址
for (JSONObject item : list) {
item.put("REC_DATE", Instant.ofEpochMilli(Long.parseLong(item.getString("REC_DATE")))
......@@ -2905,6 +2910,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
item.put("CAN_DELETE", this.checkEquipIsCanDelete(item.getString(SEQUENCE_NBR)));
// 单位类型区分是监管还是企业
item.put("companyType", companyLevel);
// 区分新增设备、历史有证设备、历史无证设备,与使用登记一致:0-新设备、1-历史有证设备、2-历史无证设备
item.put("regType", CommonServiceImpl.genRegTypeByDataSource(item.getString(DATA_SOURCE)));
// 是否发生后续业务,前端控制是否可编辑
item.put(BaseUseRegisterResultData.HAPPEN_AFTER_BIZ, afterBizMap.getOrDefault(item.getString(SEQUENCE_NBR), false));
item.put("DATA_QUALITY_SCORE", commonServiceImpl.castDataQualityScore2Name(item.getString(DATA_QUALITY_SCORE), item.getBoolean(IS_INTO_MANAGEMENT)));
}
}
......@@ -2917,6 +2926,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
return result;
}
private Map<String, Boolean> getHasHappenAfterBiz(List<String> equIds) {
List<CountDto> countDtoList = commonMapper.countBizNumAfterUseRegBatchEquip(equIds);
return countDtoList.stream().collect(Collectors.toMap(CountDto::getKeyStr, e-> e.getLongValue() > 0));
}
private String getCompanyLevel(JSONObject company) {
if (BaseController.COMPANY_TYPE_COMPANY.equals(company.getString("level"))) {
......
......@@ -897,7 +897,7 @@ public class JgTableDataExportServiceImpl implements IJgTableDataExportService {
}
@Override
public void userInfoExportWithAdmin(String uuid, String ids, Map<String, String> map) {
public void userInfoExportWithAdmin(String uuid, String ids, Map<String, Object> map) {
List<String> userInfoSeqs = getUserInfoSeqs(true, ids, map);
List<Map<String, String>> enterInfoWithExport = tzsUserInfoMapper.getUserInfoWithExport(userInfoSeqs);
List<UserInfoVo> exportData = JSON.parseArray(JSON.toJSONString(enterInfoWithExport), UserInfoVo.class);
......
......@@ -142,4 +142,7 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty(value = "更新时间")
protected Date recDate;
@ApiModelProperty(value = "创建时间")
protected Date createDate;
}
......@@ -236,4 +236,10 @@ public class TzsUserInfo extends BaseEntity {
*/
@TableField(value = "transfer_out_time")
protected Date transferOutTime;
/**
* 创建时间
*/
@TableField(value = "create_date")
protected Date createDate;
}
......@@ -316,7 +316,8 @@
u.sequence_nbr as uid,
u.sequence_nbr as "rowId",
concat(e.city, e.district) as fullAddress,
u.rec_date,
DATE_FORMAT(u.rec_date,'%Y-%m-%d') AS recDate,
DATE_FORMAT(u.create_date,'%Y-%m-%d') AS createDate,
e.supervise_org_name as superviseOrgName,
e.supervise_org_name as supervise_org_name,
e.use_code as useCode
......@@ -345,6 +346,9 @@
<if test="filter.superviseOrgCode != null and filter.superviseOrgCode != ''">
and e.supervise_org_code like concat('%',#{filter.superviseOrgCode}, '%')
</if>
<if test="filter.createDateStart != null and filter.createDateEnd != null">
and (u.create_date between #{filter.createDateStart} and #{filter.createDateEnd})
</if>
</where>) as a
<where>
<if test="filter.useUnit != null and filter.useUnit != ''">
......
......@@ -29,6 +29,7 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
......@@ -36,15 +37,18 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@RestController
@Api(tags = "用户信息Api")
@RequestMapping(value = "/userInfo")
......@@ -122,7 +126,7 @@ public class TzsUserInfoController extends BaseController {
public ResponseModel<IPage<TzsUserInfoDto>> queryForPage(@RequestParam(value = "current") String current,
@RequestParam(value = "size") String size,
@RequestParam(value = "sort", required = false) String sort,
@RequestParam Map<String, String> map) {
@RequestParam Map<String, Object> map) {
TzsUserInfoDto dto = JSON.parseObject(JSON.toJSONString(map), TzsUserInfoDto.class);
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
if (ObjectUtils.isEmpty(reginParams)) {
......@@ -319,10 +323,32 @@ public class TzsUserInfoController extends BaseController {
@RequestParam(value = "size") long size,
@RequestParam(value = "sort", required = false) String sort,
@RequestParam(required = false, defaultValue = "all") String type,
@RequestBody Map<String, String> map) {
@RequestBody Map<String, Object> map) {
UserPermissionDto filter = JSON.parseObject(JSON.toJSONString(map), UserPermissionDto.class);
filter.setOrgCode(getSelectedOrgInfo().getCompany().getOrgCode());
filter.setCityCode(getSelectedOrgInfo().getCompany().getCompanyCode());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (!ValidationUtil.isEmpty(map.get("createDateRange"))){
String createDateRangeObj = Objects.toString(map.get("createDateRange"));
String[] split = createDateRangeObj.replace("[", "").replace("]", "").split(",");
String startDateStr = split[0];
String endDateStr = split[1];
try {
Date startDate = sdf.parse(startDateStr);
Date endDate = sdf.parse(endDateStr);
Calendar calendar = Calendar.getInstance();
calendar.setTime(endDate);
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MILLISECOND, 999);
endDate = calendar.getTime();
filter.setCreateDateStart(startDate);
filter.setCreateDateEnd(endDate);
} catch (Exception e) {
log.error("日期转化异常:{}", e.getMessage());
}
}
Page<UserPermissionDto> userPermissionDtos = tzsUserInfoServiceImpl.getUserByPermission(current, size, type, filter, sort);
return ResponseHelper.buildResponse(userPermissionDtos);
}
......
......@@ -81,6 +81,7 @@ import javax.validation.Validator;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
......@@ -1118,6 +1119,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
.collect(Collectors.joining(","));
tzsUserInfo.setSubPostName(subPostNames);
}
tzsUserInfo.setCreateDate(new Date());
tzsUserInfo = this.createWithModel(tzsUserInfo);
// 保存资质
tzsUserPermissionServiceImpl.savePermissionData(tzsUserInfo);
......@@ -1512,6 +1514,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
dataList.forEach(data -> {
TzsUserInfoDto dto = new TzsUserInfoDto();
BeanUtils.copyProperties(data, dto);
dto.setCreateDate(new Date());
this.saveUserInfo(dto);
});
} catch (Exception e) {
......
......@@ -319,5 +319,19 @@ public class IdxBizJgProjectContraption extends BaseEntity {
@TableField(exist = false)
private String companyType;
/**
* 是否发生后续业务
*/
@TableField(exist = false)
private Boolean happenAfterBiz;
/**
* 登记类型:0-新增;1-历史有证;2-历史无证
*/
@TableField(exist = false)
private String regType;
}
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