Commit d57bf1e2 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 bf844ece bffeebfa
package ${package.Entity};
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* ${table.comment!}
*
* @author ${author}
* @date ${date}
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("${table.name}")
public class ${entity} extends BaseEntity {
private static final long serialVersionUID = 1L;
<#-- ---------- BEGIN 字段循环遍历 ---------->
<#list table.fields as field>
/**
* ${field.comment}
*/
@TableField("${field.name}")
private ${field.propertyType} ${field.propertyName};
</#list>
}
package ${package.Controller};
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
<#if restControllerStyle>
import org.springframework.web.bind.annotation.RestController;
<#else>
import org.springframework.stereotype.Controller;
</#if>
<#if superControllerClassPackage??>
import ${superControllerClassPackage};
</#if>
import java.util.List;
import ${package.ServiceImpl}.${table.serviceImplName};
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import ${package.Xml}.${entity}Model;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
/**
* ${table.comment!}
*
* @author ${author}
* @date ${date}
*/
<#if restControllerStyle>
@RestController
@Api(tags = "${table.comment}Api")
<#else>
@Controller
</#if>
@RequestMapping(value = "/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}</#if>")
<#if kotlin>
class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}()</#if>
<#else>
<#if superControllerClass??>
public class ${table.controllerName} extends ${superControllerClass} {
<#else>
public class ${table.controllerName} {
</#if>
@Autowired
${table.serviceImplName} ${table.serviceImplName ?uncap_first};
/**
* 新增${table.comment}
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增${table.comment}", notes = "新增${table.comment}")
public ResponseModel<${entity}Model> save(@RequestBody ${entity}Model model) {
model = ${table.serviceImplName ?uncap_first}.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新${table.comment}", notes = "根据sequenceNbr更新${table.comment}")
public ResponseModel<${entity}Model> updateBySequenceNbr${entity}(@RequestBody ${entity}Model model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(${table.serviceImplName ?uncap_first}.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除${table.comment}", notes = "根据sequenceNbr删除${table.comment}")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(${table.serviceImplName ?uncap_first}.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个${table.comment}", notes = "根据sequenceNbr查询单个${table.comment}")
public ResponseModel<${entity}Model> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(${table.serviceImplName ?uncap_first}.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "分页查询${table.comment}", notes = "分页查询${table.comment}")
public ResponseModel<Page<${entity}Model>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<${entity}Model> page = new Page<${entity}Model>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(${table.serviceImplName ?uncap_first}.queryFor${entity}Page(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "列表全部数据查询${table.comment}", notes = "列表全部数据查询${table.comment}")
@GetMapping(value = "/list")
public ResponseModel<List<${entity}Model>> selectForList() {
return ResponseHelper.buildResponse(${table.serviceImplName ?uncap_first}.queryFor${entity}List());
}
}
</#if>
\ No newline at end of file
package com.yeejoin.amos.boot.module.${package.ModuleName}.api.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
<#if entityLombokModel>
import lombok.Data;
import lombok.EqualsAndHashCode;
</#if>
import java.util.Date;
/**
* ${table.comment!}
*
* @author ${author}
* @date ${date}
*/
<#if entityLombokModel>
@Data
<#if superEntityClass??>
@EqualsAndHashCode(callSuper = true)
<#else>
@EqualsAndHashCode(callSuper = false)
</#if>
</#if>
<#if swagger2>
@ApiModel(value="${entity}Dto", description="${table.comment!}")
</#if>
public class ${entity}Dto extends BaseDto {
private static final long serialVersionUID = 1L;
<#-- ---------- BEGIN 字段循环遍历 ---------->
<#list table.fields as field>
<#if field.keyFlag>
<#assign keyPropertyName="${field.propertyName}"/>
</#if>
<#if field.comment!?length gt 0>
<#if swagger2>
@ApiModelProperty(value = "${field.comment}")
<#else>
/**
* ${field.comment}
*/
</#if>
</#if>
<#if field.keyFlag>
<#-- 主键 -->
<#if field.keyIdentityFlag>
@TableId(value = "${field.name}", type = IdType.AUTO)
<#elseif idType??>
@TableId(value = "${field.name}", type = IdType.${idType})
<#elseif field.convert>
@TableId("${field.name}")
</#if>
<#-- 普通字段 -->
<#elseif field.fill??>
<#-- ----- 存在字段填充设置 ----->
<#if field.convert>
@TableField(value = "${field.name}", fill = FieldFill.${field.fill})
<#else>
@TableField(fill = FieldFill.${field.fill})
</#if>
<#elseif field.convert>
@TableField("${field.name}")
</#if>
<#-- 乐观锁注解 -->
<#if (versionFieldName!"") == field.name>
@Version
</#if>
<#-- 逻辑删除注解 -->
<#if (logicDeleteFieldName!"") == field.name>
@TableLogic
</#if>
private ${field.propertyType} ${field.propertyName};
</#list>
<#------------ END 字段循环遍历 ---------->
<#if !entityLombokModel>
<#list table.fields as field>
<#if field.propertyType == "boolean">
<#assign getprefix="is"/>
<#else>
<#assign getprefix="get"/>
</#if>
public ${field.propertyType} ${getprefix}${field.capitalName}() {
return ${field.propertyName};
}
<#if entityBuilderModel>
public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
<#else>
public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
</#if>
this.${field.propertyName} = ${field.propertyName};
<#if entityBuilderModel>
return this;
</#if>
}
</#list>
</#if>
<#if entityColumnConstant>
<#list table.fields as field>
public static final String ${field.name?upper_case} = "${field.name}";
</#list>
</#if>
<#if activeRecord>
@Override
protected Serializable pkVal() {
<#if keyPropertyName??>
return this.${keyPropertyName};
<#else>
return null;
</#if>
}
</#if>
<#if !entityLombokModel>
@Override
public String toString() {
return "${entity}{" +
<#list table.fields as field>
<#if field_index==0>
"${field.propertyName}=" + ${field.propertyName} +
<#else>
", ${field.propertyName}=" + ${field.propertyName} +
</#if>
</#list>
"}";
}
</#if>
}
package ${package.Mapper};
import ${package.Entity}.${entity};
import ${superMapperClassPackage};
/**
* ${table.comment!} Mapper 接口
*
* @author ${author}
* @date ${date}
*/
<#if kotlin>
interface ${table.mapperName} : ${superMapperClass}<${entity}>
<#else>
public interface ${table.mapperName} extends ${superMapperClass}<${entity}> {
}
</#if>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${package.Mapper}.${table.mapperName}">
<#if enableCache>
<!-- 开启二级缓存 -->
<cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>
</#if>
<#if baseResultMap>
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="${package.Entity}.${entity}">
<#list table.fields as field>
<#if field.keyFlag><#--生成主键排在第一位-->
<id column="${field.name}" property="${field.propertyName}"/>
</#if>
</#list>
<#list table.commonFields as field><#--生成公共字段 -->
<result column="${field.name}" property="${field.propertyName}"/>
</#list>
<#list table.fields as field>
<#if !field.keyFlag><#--生成普通字段 -->
<result column="${field.name}" property="${field.propertyName}"/>
</#if>
</#list>
</resultMap>
</#if>
<#if baseColumnList>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
<#list table.commonFields as field>
${field.name},
</#list>
${table.fieldNames}
</sql>
</#if>
</mapper>
package com.yeejoin.amos.boot.module.${package.ModuleName}.api.model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.typroject.tyboot.core.rdbms.model.BaseModel;
<#if entityLombokModel>
import lombok.Data;
import lombok.EqualsAndHashCode;
</#if>
/**
* ${table.comment!}
*
* @author ${author}
* @date ${date}
*/
<#if entityLombokModel>
@Data
<#if superEntityClass??>
@EqualsAndHashCode(callSuper = true)
<#else>
@EqualsAndHashCode(callSuper = false)
</#if>
</#if>
<#if swagger2>
@ApiModel(value="${entity}Model", description="${table.comment!}")
</#if>
public class ${entity}Model extends BaseModel {
private static final long serialVersionUID = 1L;
<#-- ---------- BEGIN 字段循环遍历 ---------->
<#list table.fields as field>
<#if field.keyFlag>
<#assign keyPropertyName="${field.propertyName}"/>
</#if>
<#if field.comment!?length gt 0>
<#if swagger2>
@ApiModelProperty(value = "${field.comment}")
<#else>
/**
* ${field.comment}
*/
</#if>
</#if>
<#if field.keyFlag>
<#-- 主键 -->
<#if field.keyIdentityFlag>
@TableId(value = "${field.name}", type = IdType.AUTO)
<#elseif idType??>
@TableId(value = "${field.name}", type = IdType.${idType})
<#elseif field.convert>
@TableId("${field.name}")
</#if>
<#-- 普通字段 -->
<#elseif field.fill??>
<#-- ----- 存在字段填充设置 ----->
<#if field.convert>
@TableField(value = "${field.name}", fill = FieldFill.${field.fill})
<#else>
@TableField(fill = FieldFill.${field.fill})
</#if>
<#elseif field.convert>
@TableField("${field.name}")
</#if>
<#-- 乐观锁注解 -->
<#if (versionFieldName!"") == field.name>
@Version
</#if>
<#-- 逻辑删除注解 -->
<#if (logicDeleteFieldName!"") == field.name>
@TableLogic
</#if>
private ${field.propertyType} ${field.propertyName};
</#list>
<#------------ END 字段循环遍历 ---------->
<#if !entityLombokModel>
<#list table.fields as field>
<#if field.propertyType == "boolean">
<#assign getprefix="is"/>
<#else>
<#assign getprefix="get"/>
</#if>
public ${field.propertyType} ${getprefix}${field.capitalName}() {
return ${field.propertyName};
}
<#if entityBuilderModel>
public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
<#else>
public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
</#if>
this.${field.propertyName} = ${field.propertyName};
<#if entityBuilderModel>
return this;
</#if>
}
</#list>
</#if>
<#if entityColumnConstant>
<#list table.fields as field>
public static final String ${field.name?upper_case} = "${field.name}";
</#list>
</#if>
<#if activeRecord>
@Override
protected Serializable pkVal() {
<#if keyPropertyName??>
return this.${keyPropertyName};
<#else>
return null;
</#if>
}
</#if>
<#if !entityLombokModel>
@Override
public String toString() {
return "${entity}{" +
<#list table.fields as field>
<#if field_index==0>
"${field.propertyName}=" + ${field.propertyName} +
<#else>
", ${field.propertyName}=" + ${field.propertyName} +
</#if>
</#list>
"}";
}
</#if>
}
package com.yeejoin.amos.boot.module.${package.ModuleName}.api.service;
/**
* ${table.comment!}接口类
*
* @author ${author}
* @date ${date}
*/
<#if kotlin>
interface ${table.serviceName} : ${superServiceClass}<${entity}>
<#else>
public interface ${table.serviceName} {}
</#if>
package ${package.ServiceImpl};
import ${package.Entity}.${entity};
import ${package.Mapper}.${table.mapperName};
import ${package.Service}.${table.serviceName};
import ${package.Xml}.${entity}Model;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
/**
* ${table.comment!}服务实现类
*
* @author ${author}
* @date ${date}
*/
@Service
public class ${table.serviceImplName} extends BaseService<${entity}Model,${entity},${table.mapperName}> implements ${table.serviceName} {
/**
* 分页查询
*/
public Page<${entity}Model> queryFor${entity}Page(Page<${entity}Model> page) {
return this.queryForPage(page, null, false);
}
/**
* 列表查询 示例
*/
public List<${entity}Model> queryFor${entity}List() {
return this.queryForList("" , false);
}
}
\ No newline at end of file
...@@ -25,7 +25,12 @@ public enum FlowStatusEnum { ...@@ -25,7 +25,12 @@ public enum FlowStatusEnum {
/** /**
* 已驳回 * 已驳回
*/ */
REJECTED(6614, "已驳回"); REJECTED(6614, "已驳回"),
/**
* 已撤回
*/
ROLLBACK(6615, "已撤回");
private final int code; private final int code;
......
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel; import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication; import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstDto;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
/** /**
...@@ -15,6 +16,6 @@ import org.apache.ibatis.annotations.Param; ...@@ -15,6 +16,6 @@ import org.apache.ibatis.annotations.Param;
public interface JyjcOpeningApplicationMapper extends BaseMapper<JyjcOpeningApplication> { public interface JyjcOpeningApplicationMapper extends BaseMapper<JyjcOpeningApplication> {
Page<JyjcOpeningApplicationModel> selectJyjcOpeningApplicationList(@Param("page")Page<JyjcOpeningApplication> page, Page<JyjcOpeningApplicationModel> selectJyjcOpeningApplicationList(@Param("page")Page<JyjcOpeningApplication> page,
@Param("jyjcOpeningApplicationModel") JyjcOpeningApplicationModel jyjcOpeningApplicationModel,@Param("applyStartTime") String applyStartTime,@Param("applyendTime") String applyendTime); @Param("jyjcOpeningApplicationRequstDto") JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto, @Param("applyStartTime") String applyStartTime, @Param("applyendTime") String applyendTime);
} }
package com.yeejoin.amos.boot.module.jyjc.api.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
public class JyjcOpeningApplicationRequstDto {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "单位编码")
private String unitCode;
@ApiModelProperty (value = "单位编码Name")
private String unitCodeName;
@ApiModelProperty (value = "检测区域名称(冗余)")
private String detectionRegionName;
@ApiModelProperty (value = "申请单号")
private String applicationSeq;
@ApiModelProperty (value = "检验结果方式")
private String resultType;
@ApiModelProperty (value = "有效期至")
private String expiryDate;
@ApiModelProperty (value = "受理日期(接收日期)")
private String acceptDate;
@ApiModelProperty (value = "状态")
private String status;
@ApiModelProperty (value = "状态Name")
private String statusName;
@ApiModelProperty (value = "申请时间")
private String applyTime;
}
...@@ -27,17 +27,17 @@ ...@@ -27,17 +27,17 @@
status_name status_name
from tz_jyjc_opening_application from tz_jyjc_opening_application
<where> <where>
<if test="jyjcOpeningApplicationModel.applicationSeq != '' and jyjcOpeningApplicationModel.applicationSeq != null"> <if test="jyjcOpeningApplicationRequstDto.applicationSeq != '' and jyjcOpeningApplicationRequstDto.applicationSeq != null">
and application_seq like concat('%',#{jyjcOpeningApplicationModel.applicationSeq},'%') and application_seq like concat('%',#{jyjcOpeningApplicationRequstDto.applicationSeq},'%')
</if> </if>
<if test="jyjcOpeningApplicationModel.unitCode != '' and jyjcOpeningApplicationModel.unitCode != null"> <if test="jyjcOpeningApplicationRequstDto.unitCode != '' and jyjcOpeningApplicationRequstDto.unitCode != null">
and unit_code like concat('%',#{jyjcOpeningApplicationModel.unitCode},'%') and unit_code like concat('%',#{jyjcOpeningApplicationRequstDto.unitCode},'%')
</if> </if>
<if test="jyjcOpeningApplicationModel.acceptDate != '' and jyjcOpeningApplicationModel.acceptDate != null"> <if test="jyjcOpeningApplicationRequstDto.acceptDate != '' and jyjcOpeningApplicationRequstDto.acceptDate != null">
and accept_date = #{jyjcOpeningApplicationModel.acceptDate}, and accept_date = #{jyjcOpeningApplicationRequstDto.acceptDate},
</if> </if>
<if test="jyjcOpeningApplicationModel.status != '' and jyjcOpeningApplicationModel.status != null"> <if test="jyjcOpeningApplicationRequstDto.status != '' and jyjcOpeningApplicationRequstDto.status != null">
and status = #{jyjcOpeningApplicationModel.status} and status = #{jyjcOpeningApplicationRequstDto.status}
</if> </if>
<if test="applyendTime != '' and applyendTime != null"> <if test="applyendTime != '' and applyendTime != null">
and apply_time &lt;= #{applyendTime} and apply_time &lt;= #{applyendTime}
......
package com.yeejoin.amos.boot.module.jyjc.biz.controller; package com.yeejoin.amos.boot.module.jyjc.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl; import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.CommonserviceImpl;
import com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcOpeningApplicationServiceImpl; import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; 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.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.Collection;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/** /**
*
* @author system_generator * @author system_generator
* @date 2023-12-13 * @date 2023-12-13
*/ */
...@@ -39,9 +24,8 @@ import java.util.stream.Collectors; ...@@ -39,9 +24,8 @@ import java.util.stream.Collectors;
@RequestMapping(value = "/common") @RequestMapping(value = "/common")
public class CommonController extends BaseController { public class CommonController extends BaseController {
@Autowired @Autowired
CommonserviceImpl commonserviceImpl; CommonserviceImpl commonserviceImpl;
/** /**
* 新增 * 新增
...@@ -49,10 +33,21 @@ public class CommonController extends BaseController { ...@@ -49,10 +33,21 @@ public class CommonController extends BaseController {
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/getJyjcPersonByUnitCode") @PostMapping(value = "/getJyjcPersonByUnitCode")
@ApiOperation(httpMethod = "GET", value = "根据公司的unitCode获取检测检验人员列表", notes = "根据公司的unitCode获取检测检验人员列表") @ApiOperation(httpMethod = "GET", value = "根据公司的unitCode获取检测检验人员列表", notes = "根据公司的unitCode获取检测检验人员列表")
public ResponseModel<List<TzsUserInfo>> getUserInfosByUnitCode(@RequestParam String unitCode) { public ResponseModel<List<TzsUserInfo>> getUserInfosByUnitCode(@RequestParam String unitCode) {
return ResponseHelper.buildResponse(commonserviceImpl.getUserInfosByUnitCode(unitCode)); return ResponseHelper.buildResponse(commonserviceImpl.getUserInfosByUnitCode(unitCode));
} }
/**
* 查询检验检测机构列表(基本信息及联系人)
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getInspectionUnitList")
@ApiOperation(httpMethod = "GET", value = "查询检验检测机构列表(基本信息及联系人)", notes = "查询检验检测机构列表(基本信息及联系人)")
public ResponseModel<List<TzBaseEnterpriseInfo>> getInspectionUnitList() {
return ResponseHelper.buildResponse(commonserviceImpl.getInspectionUnitList());
}
} }
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jyjc.biz.controller; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jyjc.biz.controller;
import cn.hutool.core.map.MapBuilder; import cn.hutool.core.map.MapBuilder;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication; import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstDto;
import com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException; import com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException;
import com.yeejoin.amos.feign.privilege.Privilege; import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
...@@ -99,6 +100,19 @@ public class JyjcOpeningApplicationController extends BaseController { ...@@ -99,6 +100,19 @@ public class JyjcOpeningApplicationController extends BaseController {
return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.removeById(sequenceNbr)); return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.removeById(sequenceNbr));
} }
/**
* 根据sequenceNbr删除
*
* @param sequenceNbrList 主键列表
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "batchDelete")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除", notes = "根据sequenceNbr删除")
public ResponseModel<Boolean> deleteBySequenceNbr(@RequestParam(value = "sequenceNbrList") List<Long> sequenceNbrList){
return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.deleteBatchSeq(sequenceNbrList));
}
/** /**
* 根据sequenceNbr查询 * 根据sequenceNbr查询
* *
...@@ -123,11 +137,11 @@ public class JyjcOpeningApplicationController extends BaseController { ...@@ -123,11 +137,11 @@ public class JyjcOpeningApplicationController extends BaseController {
@GetMapping(value = "/page") @GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "分页查询", notes = "分页查询") @ApiOperation(httpMethod = "GET",value = "分页查询", notes = "分页查询")
public ResponseModel<Page<JyjcOpeningApplicationModel>> queryForPage(@RequestParam(value = "current") int current,@RequestParam public ResponseModel<Page<JyjcOpeningApplicationModel>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size,JyjcOpeningApplicationModel jyjcOpeningApplicationDto) { (value = "size") int size,JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto) {
Page<JyjcOpeningApplication> page = new Page<JyjcOpeningApplication>(); Page<JyjcOpeningApplication> page = new Page<JyjcOpeningApplication>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.queryForJyjcOpeningApplicationPage(page,jyjcOpeningApplicationDto)); return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.queryForJyjcOpeningApplicationPage(page,jyjcOpeningApplicationRequstDto));
} }
...@@ -141,12 +155,12 @@ public class JyjcOpeningApplicationController extends BaseController { ...@@ -141,12 +155,12 @@ public class JyjcOpeningApplicationController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/pageForCompany") @GetMapping(value = "/pageForCompany")
@ApiOperation(httpMethod = "GET",value = "分页查询-公司", notes = "分页查询-公司") @ApiOperation(httpMethod = "GET",value = "分页查询-公司", notes = "分页查询-公司")
public ResponseModel<Page<JyjcOpeningApplicationModel>> querypageForCompany(@RequestParam(value = "current") int current,@RequestParam public ResponseModel<Page<JyjcOpeningApplicationModel>> querypageForCompany(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size,JyjcOpeningApplicationModel jyjcOpeningApplicationDto) { (value = "size") int size, JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto) {
Page<JyjcOpeningApplication> page = new Page<JyjcOpeningApplication>(); Page<JyjcOpeningApplication> page = new Page<JyjcOpeningApplication>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.querypageForCompany(page,jyjcOpeningApplicationDto)); return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.querypageForCompany(page,jyjcOpeningApplicationRequstDto));
} }
/** /**
......
...@@ -5,9 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -5,9 +5,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper; import com.yeejoin.amos.boot.module.ymt.api.mapper.TzsUserInfoMapper;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -26,6 +27,10 @@ public class CommonserviceImpl { ...@@ -26,6 +27,10 @@ public class CommonserviceImpl {
@Autowired @Autowired
TzsUserInfoMapper userInfoMapper; TzsUserInfoMapper userInfoMapper;
@Autowired
TzBaseEnterpriseInfoMapper enterpriseInfoMapper;
public static final String UNIT_TYPE = "检验检测机构";
/** /**
* @return ReginParams * @return ReginParams
...@@ -43,4 +48,8 @@ public class CommonserviceImpl { ...@@ -43,4 +48,8 @@ public class CommonserviceImpl {
List<TzsUserInfo> userInfos = userInfoMapper.selectList(userInfoQueryWrapper); List<TzsUserInfo> userInfos = userInfoMapper.selectList(userInfoQueryWrapper);
return userInfos; return userInfos;
} }
public List<TzBaseEnterpriseInfo> getInspectionUnitList() {
return enterpriseInfoMapper.getInspectionUnitList(UNIT_TYPE);
}
} }
...@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication; ...@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
import com.yeejoin.amos.boot.module.jyjc.api.enums.FlowStatusEnum; import com.yeejoin.amos.boot.module.jyjc.api.enums.FlowStatusEnum;
import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper; import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcBaseMapper;
import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcOpeningApplicationMapper; import com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcOpeningApplicationMapper;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstDto;
import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService; import com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel; import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException; import com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException;
...@@ -172,32 +173,32 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -172,32 +173,32 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
return this.queryForList("", false); return this.queryForList("", false);
} }
public Page<JyjcOpeningApplicationModel> queryForJyjcOpeningApplicationPage(Page<JyjcOpeningApplication> page, JyjcOpeningApplicationModel jyjcOpeningApplicationModel) { public Page<JyjcOpeningApplicationModel> queryForJyjcOpeningApplicationPage(Page<JyjcOpeningApplication> page, JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto) {
String applyStartTime = ""; String applyStartTime = "";
String applyEndTime = ""; String applyEndTime = "";
if (ObjectUtils.isNotEmpty(jyjcOpeningApplicationModel.getApplyTime())) { if (ObjectUtils.isNotEmpty(jyjcOpeningApplicationRequstDto.getApplyTime())) {
String date = DateUtil.format(jyjcOpeningApplicationModel.getApplyTime(), DatePattern.NORM_DATE_PATTERN); String date = jyjcOpeningApplicationRequstDto.getApplyTime();
applyStartTime = date + " 00:00:00"; applyStartTime = date + " 00:00:00";
applyEndTime = date + " 23:59:59"; applyEndTime = date + " 23:59:59";
} }
return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, jyjcOpeningApplicationModel, applyStartTime, applyEndTime); return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, jyjcOpeningApplicationRequstDto, applyStartTime, applyEndTime);
} }
public Page<JyjcOpeningApplicationModel> querypageForCompany(Page<JyjcOpeningApplication> page, JyjcOpeningApplicationModel jyjcOpeningApplicationModel) { public Page<JyjcOpeningApplicationModel> querypageForCompany(Page<JyjcOpeningApplication> page, JyjcOpeningApplicationRequstDto jyjcOpeningApplicationRequstDto) {
//根据申请单中的单位信息对于列表数据进行过滤 //根据申请单中的单位信息对于列表数据进行过滤
CompanyBo companyBo = commonserviceImpl.getReginParamsOfCurrentUser().getCompany(); CompanyBo companyBo = commonserviceImpl.getReginParamsOfCurrentUser().getCompany();
if (companyBo.getLevel().equals("company")) { if (companyBo.getLevel().equals("company")) {
jyjcOpeningApplicationModel.setUnitCode(companyBo.getCompanyCode()); jyjcOpeningApplicationRequstDto.setUnitCode(companyBo.getCompanyCode());
} }
String applyStartTime = ""; String applyStartTime = "";
String applyEndTime = ""; String applyEndTime = "";
if (ObjectUtils.isNotEmpty(jyjcOpeningApplicationModel.getApplyTime())) { if (ObjectUtils.isNotEmpty(jyjcOpeningApplicationRequstDto.getApplyTime())) {
String date = DateUtil.format(jyjcOpeningApplicationModel.getApplyTime(), DatePattern.NORM_DATE_PATTERN); String date = jyjcOpeningApplicationRequstDto.getApplyTime();
applyStartTime = date + " 00:00:00"; applyStartTime = date + " 00:00:00";
applyEndTime = date + " 23:59:59"; applyEndTime = date + " 23:59:59";
} }
return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, jyjcOpeningApplicationModel, applyStartTime, applyEndTime); return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, jyjcOpeningApplicationRequstDto, applyStartTime, applyEndTime);
} }
...@@ -328,6 +329,9 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -328,6 +329,9 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// String detectionRegionName = params.get("detectionRegionName").toString(); // String detectionRegionName = params.get("detectionRegionName").toString();
jyjcOpeningApplication.setDetectionRegion(detectionRegion); jyjcOpeningApplication.setDetectionRegion(detectionRegion);
// jyjcOpeningApplication.setDetectionRegionName(detectionRegionName); // jyjcOpeningApplication.setDetectionRegionName(detectionRegionName);
if(ObjectUtils.isEmpty(jyjcOpeningApplication.getAcceptDate())){
jyjcOpeningApplication.setAcceptDate(new Date());
}
jyjcOpeningApplicationMapper.updateById(jyjcOpeningApplication); jyjcOpeningApplicationMapper.updateById(jyjcOpeningApplication);
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -345,7 +349,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -345,7 +349,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
if (ObjectUtils.isEmpty(jsonObject)) { if (ObjectUtils.isEmpty(jsonObject)) {
} }
updateModelByInstanceId(instanceId, FlowStatusEnum.REJECTED.getCode() + ""); updateModelByInstanceId(instanceId, FlowStatusEnum.ROLLBACK.getCode() + "");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
package com.yeejoin.amos.boot.module.ymt.api.common;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.util.Date;
public class DateUtils {
public static Date calculateEndOfYear(Date currentDate) {
LocalDateTime localDateTime = toLocalDateTime(currentDate);
LocalDateTime endOfYear = localDateTime.with(LocalDateTime.of(localDateTime.getYear(), 12, 31, 23, 59, 59, 999999999));
return toDate(endOfYear);
}
public static Date calculateEndOfMonth(Date currentDate) {
LocalDateTime localDateTime = toLocalDateTime(currentDate);
LocalDateTime endOfMonth = localDateTime.with(localDateTime.withDayOfMonth(localDateTime.getMonth().maxLength())
.withHour(23)
.withMinute(59)
.withSecond(59)
.withNano(999999999));
return toDate(endOfMonth);
}
public static Date calculateEndOfDay(Date currentDate) {
LocalDateTime localDateTime = toLocalDateTime(currentDate);
LocalDateTime endOfDay = localDateTime.with(LocalDateTime.of(localDateTime.toLocalDate(), LocalTime.MAX));
return toDate(endOfDay);
}
private static LocalDateTime toLocalDateTime(Date date) {
return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
}
private static Date toDate(LocalDateTime localDateTime) {
return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
}
}
//package com.yeejoin.amos.boot.module.ymt.api.controller;
//
//import com.yeejoin.amos.boot.biz.common.controller.BaseController;
//import com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//import org.typroject.tyboot.core.foundation.enumeration.UserType;
//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 java.util.List;
//
///**
// *
// * 生成顺序码
// * @author LiuLin
// * @date 2023-12-14
// */
//@RestController
//@Api(tags = "生成顺序码")
//@RequestMapping(value = "/code")
//public class CreateCodeController extends BaseController {
//
// @Autowired
// private ICreateCodeService createCodeService;
//
// /**
// * 申请单编号生成
// * @param type type
// * @param batchSize batchSize
// * @return List
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @PostMapping(value = "/ANCode")
// @ApiOperation(httpMethod = "POST", value = "申请单编号生成", notes = "申请单编号生成")
// public ResponseModel<List<String>> createANCode(@RequestParam("type") String type,
// @RequestParam("batchSize") int batchSize) {
// return ResponseHelper.buildResponse(createCodeService.createApplicationFormCode(type,batchSize));
// }
//
// /**
// * 生成设备注册编码
// * @param key key
// * @return String
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @PostMapping(value = "/DRCode")
// @ApiOperation(httpMethod = "POST", value = "生成设备注册编码", notes = "生成设备注册编码")
// public ResponseModel<String> createDRCode(@RequestParam("key") String key) {
// return ResponseHelper.buildResponse(createCodeService.createDeviceRegistrationCode(key));
// }
//
// /**
// * 使用登记证生成
// * @param key key
// * @return String
// */
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @PostMapping(value = "/URCode")
// @ApiOperation(httpMethod = "POST", value = "使用登记证生成", notes = "使用登记证生成")
// public ResponseModel<String> createURCode(@RequestParam("key") String key) {
// return ResponseHelper.buildResponse(createCodeService.createUseRegistrationCode(key));
// }
//}
package com.yeejoin.amos.boot.module.ymt.api.mapper; package com.yeejoin.amos.boot.module.ymt.api.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquEnterDto; import com.yeejoin.amos.boot.module.ymt.api.dto.EquEnterDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto; import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo; import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import org.springframework.data.repository.query.Param;
import java.util.List;
/** /**
* 企业数据信息 Mapper 接口 * 企业数据信息 Mapper 接口
...@@ -44,4 +45,11 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI ...@@ -44,4 +45,11 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
IPage<TzBaseEnterpriseInfoDto> page(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto); IPage<TzBaseEnterpriseInfoDto> page(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto);
IPage<TzBaseEnterpriseInfoDto> pageList(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto, List orgCodeList); IPage<TzBaseEnterpriseInfoDto> pageList(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto, List orgCodeList);
/**
* 查找企业关联设备详情列表
*
*/
List<TzBaseEnterpriseInfo> getInspectionUnitList(@Param("unitType") String unitType);
} }
...@@ -2,6 +2,11 @@ package com.yeejoin.amos.boot.module.ymt.api.service; ...@@ -2,6 +2,11 @@ package com.yeejoin.amos.boot.module.ymt.api.service;
import java.util.List; import java.util.List;
/**
* 生成码服务类
* @author LiuLin
* @date 2023-12-14
*/
public interface ICreateCodeService { public interface ICreateCodeService {
/** /**
...@@ -20,4 +25,11 @@ public interface ICreateCodeService { ...@@ -20,4 +25,11 @@ public interface ICreateCodeService {
*/ */
String createDeviceRegistrationCode(String key); String createDeviceRegistrationCode(String key);
/**
* 生成使用登记证编号(13位,起11陕C00001(23))
* @param key key
* @return 顺序编号
*/
String createUseRegistrationCode(String key);
} }
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
</if> </if>
<if <if
test="tzBaseEnterpriseInfoDto.useUnit!=null and tzBaseEnterpriseInfoDto.useUnit!='' "> test="tzBaseEnterpriseInfoDto.useUnit!=null and tzBaseEnterpriseInfoDto.useUnit!='' ">
AND use_unit LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.useUnit},'%') AND use_unit LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.useUnit},'%')
</if> </if>
<if <if
test="tzBaseEnterpriseInfoDto.useUnitCertificate!=null and tzBaseEnterpriseInfoDto.useUnitCertificate!='' "> test="tzBaseEnterpriseInfoDto.useUnitCertificate!=null and tzBaseEnterpriseInfoDto.useUnitCertificate!='' ">
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</if> </if>
<if <if
test="tzBaseEnterpriseInfoDto.useCode!=null and tzBaseEnterpriseInfoDto.useCode!='' "> test="tzBaseEnterpriseInfoDto.useCode!=null and tzBaseEnterpriseInfoDto.useCode!='' ">
AND use_code LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.useCode},'%') AND use_code LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.useCode},'%')
</if> </if>
<if <if
test="tzBaseEnterpriseInfoDto.region!=null and tzBaseEnterpriseInfoDto.region!='' "> test="tzBaseEnterpriseInfoDto.region!=null and tzBaseEnterpriseInfoDto.region!='' ">
...@@ -65,11 +65,11 @@ ...@@ -65,11 +65,11 @@
</if> </if>
<if <if
test="tzBaseEnterpriseInfoDto.legalPerson!=null and tzBaseEnterpriseInfoDto.legalPerson!='' "> test="tzBaseEnterpriseInfoDto.legalPerson!=null and tzBaseEnterpriseInfoDto.legalPerson!='' ">
AND legal_person LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.legalPerson},'%') AND legal_person LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.legalPerson},'%')
</if> </if>
<if <if
test="tzBaseEnterpriseInfoDto.legalPhone!=null and tzBaseEnterpriseInfoDto.legalPhone!='' "> test="tzBaseEnterpriseInfoDto.legalPhone!=null and tzBaseEnterpriseInfoDto.legalPhone!='' ">
AND legal_phone LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.legalPhone},'%') AND legal_phone LIKE CONCAT('%',#{tzBaseEnterpriseInfoDto.legalPhone},'%')
</if> </if>
<if <if
test="tzBaseEnterpriseInfoDto.superviseOrgCode!=null and tzBaseEnterpriseInfoDto.superviseOrgCode!='' "> test="tzBaseEnterpriseInfoDto.superviseOrgCode!=null and tzBaseEnterpriseInfoDto.superviseOrgCode!='' ">
...@@ -154,5 +154,10 @@ ...@@ -154,5 +154,10 @@
<select id="selectByUseUnit" resultType="com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo"> <select id="selectByUseUnit" resultType="com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo">
select * from tz_base_enterprise_info where use_unit = #{useUnit} select * from tz_base_enterprise_info where use_unit = #{useUnit}
</select> </select>
<select id="getInspectionUnitList" resultType="com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo">
select sequence_nbr,use_code,use_unit,use_contact,contact_phone
from tz_base_enterprise_info
where unit_type LIKE CONCAT('%',#{unitType},'%')
</select>
</mapper> </mapper>
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