forked from rongchao/epmet-cloud-rizhao
18 changed files with 1221 additions and 0 deletions
@ -0,0 +1,65 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 日照:企业走访 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EnterpriseInterviewDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 走访企业ID |
||||
|
*/ |
||||
|
private String enterpriseId; |
||||
|
|
||||
|
/** |
||||
|
* 走访企业名称 |
||||
|
*/ |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 走访时间 |
||||
|
*/ |
||||
|
private Date invTime; |
||||
|
|
||||
|
/** |
||||
|
* 走访人员(多个以“,”相隔) |
||||
|
*/ |
||||
|
private String staffs; |
||||
|
|
||||
|
/** |
||||
|
* 走访人员职务 |
||||
|
*/ |
||||
|
private String jobType; |
||||
|
|
||||
|
/** |
||||
|
* 走访方式 |
||||
|
*/ |
||||
|
private String interviewType; |
||||
|
|
||||
|
/** |
||||
|
* 企业问题 |
||||
|
*/ |
||||
|
private String problem; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 日照:企业排查管理 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EnterpriseInvestigateDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 排查企业ID |
||||
|
*/ |
||||
|
private String enterpriseId; |
||||
|
|
||||
|
/** |
||||
|
* 排查时间 |
||||
|
*/ |
||||
|
private String invTime; |
||||
|
|
||||
|
/** |
||||
|
* 排查企业名称 |
||||
|
*/ |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 排查主题 |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 排查人员(多个以“,”相隔) |
||||
|
*/ |
||||
|
private String staffs; |
||||
|
|
||||
|
/** |
||||
|
* 排查结果 |
||||
|
*/ |
||||
|
private String consequence; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @author yan Lu |
||||
|
* @description 描述 |
||||
|
* @create 2023/6/19 17:10 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EnterpriseInterviewFormDTO extends PageFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 4120099044113153827L; |
||||
|
|
||||
|
/** |
||||
|
* 主键ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 走访企业ID |
||||
|
*/ |
||||
|
private String enterpriseId; |
||||
|
|
||||
|
/** |
||||
|
* 走访企业名称 |
||||
|
*/ |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 走访时间 |
||||
|
*/ |
||||
|
private String invTime; |
||||
|
|
||||
|
/** |
||||
|
* 走访人员(多个以“,”相隔) |
||||
|
*/ |
||||
|
private String staffs; |
||||
|
|
||||
|
/** |
||||
|
* 走访人员职务 |
||||
|
*/ |
||||
|
private String jobType; |
||||
|
|
||||
|
/** |
||||
|
* 走访方式 |
||||
|
*/ |
||||
|
private String interviewType; |
||||
|
|
||||
|
/** |
||||
|
* 企业问题 |
||||
|
*/ |
||||
|
private String problem; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 走访开始时间 |
||||
|
*/ |
||||
|
private String startTime; |
||||
|
|
||||
|
/** |
||||
|
* 走访结束时间 |
||||
|
*/ |
||||
|
private String endTime; |
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.dto.form.PageFormDTO; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @author yan Lu |
||||
|
* @description 描述 |
||||
|
* @create 2023/6/19 16:11 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EnterpriseInvestigateFormDTO extends PageFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -1976277675056422656L; |
||||
|
|
||||
|
/** |
||||
|
* 主键ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 排查企业ID |
||||
|
*/ |
||||
|
private String enterpriseId; |
||||
|
|
||||
|
/** |
||||
|
* 排查时间 |
||||
|
*/ |
||||
|
private String invTime; |
||||
|
|
||||
|
/** |
||||
|
* 排查企业名称 |
||||
|
*/ |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 排查主题 |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 排查人员(多个以“,”相隔) |
||||
|
*/ |
||||
|
private String staffs; |
||||
|
|
||||
|
/** |
||||
|
* 排查结果 |
||||
|
*/ |
||||
|
private String consequence; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 排查开始时间 |
||||
|
*/ |
||||
|
private String startTime; |
||||
|
|
||||
|
/** |
||||
|
* 排查结束时间 |
||||
|
*/ |
||||
|
private String endTime; |
||||
|
} |
@ -0,0 +1,88 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.EnterpriseInterviewDTO; |
||||
|
import com.epmet.dto.KeyEnterpriseDTO; |
||||
|
import com.epmet.dto.form.EnterpriseInterviewFormDTO; |
||||
|
import com.epmet.service.EnterpriseInterviewService; |
||||
|
import com.epmet.service.KeyEnterpriseService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.text.ParseException; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 日照:企业走访 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("enterpriseInterview") |
||||
|
public class EnterpriseInterviewController { |
||||
|
|
||||
|
@Autowired |
||||
|
private EnterpriseInterviewService enterpriseInterviewService; |
||||
|
|
||||
|
@Autowired |
||||
|
private KeyEnterpriseService keyEnterpriseService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<EnterpriseInterviewDTO>> page(@RequestParam Map<String, Object> params) { |
||||
|
PageData<EnterpriseInterviewDTO> page = enterpriseInterviewService.page(params); |
||||
|
return new Result<PageData<EnterpriseInterviewDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) |
||||
|
public Result<EnterpriseInterviewDTO> get(@PathVariable("id") String id) { |
||||
|
EnterpriseInterviewDTO data = enterpriseInterviewService.get(id); |
||||
|
if (null != data.getEnterpriseId()) { |
||||
|
KeyEnterpriseDTO keyEnterpriseDTO = keyEnterpriseService.get(data.getId()); |
||||
|
if (null != keyEnterpriseDTO && null != keyEnterpriseDTO.getUnitName()) { |
||||
|
data.setUnitName(keyEnterpriseDTO.getUnitName()); |
||||
|
} |
||||
|
} |
||||
|
return new Result<EnterpriseInterviewDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody EnterpriseInterviewFormDTO dto) throws ParseException { |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
enterpriseInterviewService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody EnterpriseInterviewFormDTO dto) throws ParseException { |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
enterpriseInterviewService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids) { |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
enterpriseInterviewService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("search") |
||||
|
public Result<PageData<EnterpriseInterviewDTO>> search(@RequestBody EnterpriseInterviewFormDTO formDto) { |
||||
|
return new Result().ok(enterpriseInterviewService.search(formDto)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,89 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.AssertUtils; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.EnterpriseInvestigateDTO; |
||||
|
import com.epmet.dto.KeyEnterpriseDTO; |
||||
|
import com.epmet.dto.form.EnterpriseInvestigateFormDTO; |
||||
|
import com.epmet.service.EnterpriseInvestigateService; |
||||
|
import com.epmet.service.KeyEnterpriseService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.text.ParseException; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 日照:企业排查管理 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("enterpriseInvestigate") |
||||
|
public class EnterpriseInvestigateController { |
||||
|
|
||||
|
@Autowired |
||||
|
private EnterpriseInvestigateService enterpriseInvestigateService; |
||||
|
|
||||
|
@Autowired |
||||
|
private KeyEnterpriseService keyEnterpriseService; |
||||
|
|
||||
|
@RequestMapping("page") |
||||
|
public Result<PageData<EnterpriseInvestigateDTO>> page(@RequestParam Map<String, Object> params) { |
||||
|
PageData<EnterpriseInvestigateDTO> page = enterpriseInvestigateService.page(params); |
||||
|
return new Result<PageData<EnterpriseInvestigateDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) |
||||
|
public Result<EnterpriseInvestigateDTO> get(@PathVariable("id") String id) { |
||||
|
EnterpriseInvestigateDTO data = enterpriseInvestigateService.get(id); |
||||
|
if (null != data.getEnterpriseId()) { |
||||
|
KeyEnterpriseDTO keyEnterpriseDTO = keyEnterpriseService.get(data.getId()); |
||||
|
if (null != keyEnterpriseDTO && null != keyEnterpriseDTO.getUnitName()) { |
||||
|
data.setUnitName(keyEnterpriseDTO.getUnitName()); |
||||
|
} |
||||
|
} |
||||
|
return new Result<EnterpriseInvestigateDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("save") |
||||
|
public Result save(@RequestBody EnterpriseInvestigateFormDTO dto) throws ParseException { |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
enterpriseInvestigateService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@NoRepeatSubmit |
||||
|
@PostMapping("update") |
||||
|
public Result update(@RequestBody EnterpriseInvestigateFormDTO dto) throws ParseException { |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
enterpriseInvestigateService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("delete") |
||||
|
public Result delete(@RequestBody String[] ids) { |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
enterpriseInvestigateService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@PostMapping("search") |
||||
|
public Result<PageData<EnterpriseInvestigateDTO>> search(@RequestBody EnterpriseInvestigateFormDTO formDto) { |
||||
|
return new Result().ok(enterpriseInvestigateService.search(formDto)); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.EnterpriseInterviewDTO; |
||||
|
import com.epmet.entity.EnterpriseInterviewEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 日照:企业走访 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface EnterpriseInterviewDao extends BaseDao<EnterpriseInterviewEntity> { |
||||
|
|
||||
|
List<EnterpriseInterviewDTO> search(@Param("unitName") String unitName, @Param("staffs") String staffs, |
||||
|
@Param("startTime") String startTime, @Param("endTime") String endTime, |
||||
|
@Param("interviewType") String interviewType, @Param("problem") String problem, |
||||
|
@Param("remark") String remark); |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.EnterpriseInvestigateDTO; |
||||
|
import com.epmet.entity.EnterpriseInvestigateEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 日照:企业排查管理 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface EnterpriseInvestigateDao extends BaseDao<EnterpriseInvestigateEntity> { |
||||
|
|
||||
|
List<EnterpriseInvestigateDTO> search(@Param("unitName") String unitName, @Param("title") String title, |
||||
|
@Param("startTime") String startTime, @Param("endTime") String endTime, |
||||
|
@Param("consequence") String consequence, @Param("remark") String remark); |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 日照:企业走访 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@TableName("enterprise_interview") |
||||
|
public class EnterpriseInterviewEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 走访企业ID |
||||
|
*/ |
||||
|
private String enterpriseId; |
||||
|
|
||||
|
/** |
||||
|
* 走访时间 |
||||
|
*/ |
||||
|
private Date invTime; |
||||
|
|
||||
|
/** |
||||
|
* 走访人员(多个以“,”相隔) |
||||
|
*/ |
||||
|
private String staffs; |
||||
|
|
||||
|
/** |
||||
|
* 走访人员职务 |
||||
|
*/ |
||||
|
private String jobType; |
||||
|
|
||||
|
/** |
||||
|
* 走访方式 |
||||
|
*/ |
||||
|
private String interviewType; |
||||
|
|
||||
|
/** |
||||
|
* 企业问题 |
||||
|
*/ |
||||
|
private String problem; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 日照:企业排查管理 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@TableName("enterprise_investigate") |
||||
|
public class EnterpriseInvestigateEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 排查企业ID |
||||
|
*/ |
||||
|
private String enterpriseId; |
||||
|
|
||||
|
/** |
||||
|
* 排查时间 |
||||
|
*/ |
||||
|
private Date invTime; |
||||
|
|
||||
|
/** |
||||
|
* 排查主题 |
||||
|
*/ |
||||
|
private String title; |
||||
|
|
||||
|
/** |
||||
|
* 排查人员(多个以“,”相隔) |
||||
|
*/ |
||||
|
private String staffs; |
||||
|
|
||||
|
/** |
||||
|
* 排查结果 |
||||
|
*/ |
||||
|
private String consequence; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
} |
@ -0,0 +1,60 @@ |
|||||
|
package com.epmet.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 日照:企业走访 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EnterpriseInterviewExcel { |
||||
|
|
||||
|
@Excel(name = "主键ID") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "走访企业ID") |
||||
|
private String enterpriseId; |
||||
|
|
||||
|
@Excel(name = "走访时间") |
||||
|
private Date invTime; |
||||
|
|
||||
|
@Excel(name = "走访人员(多个以“,”相隔)") |
||||
|
private String staffs; |
||||
|
|
||||
|
@Excel(name = "走访人员职务") |
||||
|
private String jobType; |
||||
|
|
||||
|
@Excel(name = "走访方式 ") |
||||
|
private String interviewType; |
||||
|
|
||||
|
@Excel(name = "企业问题") |
||||
|
private String problem; |
||||
|
|
||||
|
@Excel(name = "备注") |
||||
|
private String remark; |
||||
|
|
||||
|
@Excel(name = "删除标识:0.未删除 1.已删除") |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
package com.epmet.excel; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 日照:企业排查管理 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class EnterpriseInvestigateExcel { |
||||
|
|
||||
|
@Excel(name = "主键ID") |
||||
|
private String id; |
||||
|
|
||||
|
@Excel(name = "排查企业ID") |
||||
|
private String enterpriseId; |
||||
|
|
||||
|
@Excel(name = "排查主题") |
||||
|
private String title; |
||||
|
|
||||
|
@Excel(name = "排查人员(多个以“,”相隔)") |
||||
|
private String staffs; |
||||
|
|
||||
|
@Excel(name = "排查结果") |
||||
|
private String consequence; |
||||
|
|
||||
|
@Excel(name = "备注") |
||||
|
private String remark; |
||||
|
|
||||
|
@Excel(name = "删除标识:0.未删除 1.已删除") |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
@Excel(name = "乐观锁") |
||||
|
private Integer revision; |
||||
|
|
||||
|
@Excel(name = "创建人") |
||||
|
private String createdBy; |
||||
|
|
||||
|
@Excel(name = "创建时间") |
||||
|
private Date createdTime; |
||||
|
|
||||
|
@Excel(name = "更新人") |
||||
|
private String updatedBy; |
||||
|
|
||||
|
@Excel(name = "更新时间") |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.EnterpriseInterviewDTO; |
||||
|
import com.epmet.dto.form.EnterpriseInterviewFormDTO; |
||||
|
import com.epmet.entity.EnterpriseInterviewEntity; |
||||
|
|
||||
|
import java.text.ParseException; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 日照:企业走访 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
public interface EnterpriseInterviewService extends BaseService<EnterpriseInterviewEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<EnterpriseInterviewDTO> |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
PageData<EnterpriseInterviewDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<EnterpriseInterviewDTO> |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
List<EnterpriseInterviewDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return EnterpriseInterviewDTO |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
EnterpriseInterviewDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
void save(EnterpriseInterviewFormDTO dto) throws ParseException; |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
void update(EnterpriseInterviewFormDTO dto) throws ParseException; |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
PageData<EnterpriseInterviewDTO> search(EnterpriseInterviewFormDTO formDto); |
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.dto.EnterpriseInvestigateDTO; |
||||
|
import com.epmet.dto.form.EnterpriseInvestigateFormDTO; |
||||
|
import com.epmet.entity.EnterpriseInvestigateEntity; |
||||
|
|
||||
|
import java.text.ParseException; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 日照:企业排查管理 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
public interface EnterpriseInvestigateService extends BaseService<EnterpriseInvestigateEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<EnterpriseInvestigateDTO> |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
PageData<EnterpriseInvestigateDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<EnterpriseInvestigateDTO> |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
List<EnterpriseInvestigateDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return EnterpriseInvestigateDTO |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
EnterpriseInvestigateDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
void save(EnterpriseInvestigateFormDTO dto) throws ParseException; |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
void update(EnterpriseInvestigateFormDTO dto) throws ParseException; |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2023-06-19 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
PageData<EnterpriseInvestigateDTO> search(EnterpriseInvestigateFormDTO formDto); |
||||
|
} |
@ -0,0 +1,102 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.EnterpriseInterviewDao; |
||||
|
import com.epmet.dto.EnterpriseInterviewDTO; |
||||
|
import com.epmet.dto.form.EnterpriseInterviewFormDTO; |
||||
|
import com.epmet.entity.EnterpriseInterviewEntity; |
||||
|
import com.epmet.service.EnterpriseInterviewService; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.text.ParseException; |
||||
|
import java.text.SimpleDateFormat; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 日照:企业走访 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class EnterpriseInterviewServiceImpl extends BaseServiceImpl<EnterpriseInterviewDao, EnterpriseInterviewEntity> implements EnterpriseInterviewService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<EnterpriseInterviewDTO> page(Map<String, Object> params) { |
||||
|
IPage<EnterpriseInterviewEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, EnterpriseInterviewDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<EnterpriseInterviewDTO> list(Map<String, Object> params) { |
||||
|
List<EnterpriseInterviewEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, EnterpriseInterviewDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<EnterpriseInterviewEntity> getWrapper(Map<String, Object> params) { |
||||
|
String id = (String) params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<EnterpriseInterviewEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public EnterpriseInterviewDTO get(String id) { |
||||
|
EnterpriseInterviewEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, EnterpriseInterviewDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(EnterpriseInterviewFormDTO dto) throws ParseException { |
||||
|
EnterpriseInterviewEntity entity = ConvertUtils.sourceToTarget(dto, EnterpriseInterviewEntity.class); |
||||
|
if (StringUtils.isNotEmpty(dto.getInvTime())) { |
||||
|
entity.setInvTime(new SimpleDateFormat("yyyy-MM-dd").parse(dto.getInvTime())); |
||||
|
} |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(EnterpriseInterviewFormDTO dto) throws ParseException { |
||||
|
EnterpriseInterviewEntity entity = ConvertUtils.sourceToTarget(dto, EnterpriseInterviewEntity.class); |
||||
|
if (StringUtils.isNotEmpty(dto.getInvTime())) { |
||||
|
entity.setInvTime(new SimpleDateFormat("yyyy-MM-dd").parse(dto.getInvTime())); |
||||
|
} |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageData<EnterpriseInterviewDTO> search(EnterpriseInterviewFormDTO formDto) { |
||||
|
PageInfo<EnterpriseInterviewDTO> pageInfo = PageHelper.startPage(formDto.getPageNo(), formDto.getPageSize(), formDto.getIsPage()) |
||||
|
.doSelectPageInfo(() -> baseDao.search(formDto.getUnitName(), formDto.getStaffs(), formDto.getStartTime(), formDto.getEndTime(), formDto.getInterviewType(), |
||||
|
formDto.getProblem(), formDto.getRemark())); |
||||
|
return new PageData<>(pageInfo.getList() == null ? new ArrayList<>() : pageInfo.getList(), pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,106 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
||||
|
import com.epmet.commons.tools.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.dao.EnterpriseInvestigateDao; |
||||
|
import com.epmet.dto.EnterpriseInvestigateDTO; |
||||
|
import com.epmet.dto.form.EnterpriseInvestigateFormDTO; |
||||
|
import com.epmet.entity.EnterpriseInvestigateEntity; |
||||
|
import com.epmet.service.EnterpriseInvestigateService; |
||||
|
import com.github.pagehelper.PageHelper; |
||||
|
import com.github.pagehelper.PageInfo; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.text.ParseException; |
||||
|
import java.text.SimpleDateFormat; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 日照:企业排查管理 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2023-06-19 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class EnterpriseInvestigateServiceImpl extends BaseServiceImpl<EnterpriseInvestigateDao, EnterpriseInvestigateEntity> implements EnterpriseInvestigateService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<EnterpriseInvestigateDTO> page(Map<String, Object> params) { |
||||
|
IPage<EnterpriseInvestigateEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, EnterpriseInvestigateDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<EnterpriseInvestigateDTO> list(Map<String, Object> params) { |
||||
|
List<EnterpriseInvestigateEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, EnterpriseInvestigateDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<EnterpriseInvestigateEntity> getWrapper(Map<String, Object> params) { |
||||
|
String id = (String) params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<EnterpriseInvestigateEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public EnterpriseInvestigateDTO get(String id) { |
||||
|
EnterpriseInvestigateEntity entity = baseDao.selectById(id); |
||||
|
EnterpriseInvestigateDTO dto = ConvertUtils.sourceToTarget(entity, EnterpriseInvestigateDTO.class); |
||||
|
if (null != entity.getInvTime()) { |
||||
|
dto.setInvTime(new SimpleDateFormat("yyyy-MM-dd").format(entity.getInvTime())); |
||||
|
} |
||||
|
return dto; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(EnterpriseInvestigateFormDTO dto) throws ParseException { |
||||
|
EnterpriseInvestigateEntity entity = ConvertUtils.sourceToTarget(dto, EnterpriseInvestigateEntity.class); |
||||
|
if (StringUtils.isNotEmpty(dto.getInvTime())) { |
||||
|
entity.setInvTime(new SimpleDateFormat("yyyy-MM-dd").parse(dto.getInvTime())); |
||||
|
} |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(EnterpriseInvestigateFormDTO dto) throws ParseException { |
||||
|
EnterpriseInvestigateEntity entity = ConvertUtils.sourceToTarget(dto, EnterpriseInvestigateEntity.class); |
||||
|
if (StringUtils.isNotEmpty(dto.getInvTime())) { |
||||
|
entity.setInvTime(new SimpleDateFormat("yyyy-MM-dd").parse(dto.getInvTime())); |
||||
|
} |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public PageData<EnterpriseInvestigateDTO> search(EnterpriseInvestigateFormDTO formDto) { |
||||
|
PageInfo<EnterpriseInvestigateDTO> pageInfo = PageHelper.startPage(formDto.getPageNo(), formDto.getPageSize(), formDto.getIsPage()) |
||||
|
.doSelectPageInfo(() -> baseDao.search(formDto.getUnitName(), formDto.getTitle(), formDto.getStartTime(), formDto.getEndTime(), |
||||
|
formDto.getConsequence(), formDto.getRemark())); |
||||
|
return new PageData<>(pageInfo.getList() == null ? new ArrayList<>() : pageInfo.getList(), pageInfo.getTotal()); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,71 @@ |
|||||
|
<?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="com.epmet.dao.EnterpriseInterviewDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.EnterpriseInterviewEntity" id="enterpriseInterviewMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="enterpriseId" column="ENTERPRISE_ID"/> |
||||
|
<result property="invTime" column="INV_TIME"/> |
||||
|
<result property="staffs" column="STAFFS"/> |
||||
|
<result property="jobType" column="JOB_TYPE"/> |
||||
|
<result property="interviewType" column="INTERVIEW_TYPE"/> |
||||
|
<result property="problem" column="PROBLEM"/> |
||||
|
<result property="remark" column="REMARK"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="returnMap"> |
||||
|
ei.ID, |
||||
|
ke.UNIT_NAME, |
||||
|
ei.ENTERPRISE_ID, |
||||
|
ei.INV_TIME, |
||||
|
ei.STAFFS, |
||||
|
ei.JOB_TYPE, |
||||
|
ei.INTERVIEW_TYPE, |
||||
|
ei.PROBLEM, |
||||
|
ei.REMARK |
||||
|
</sql> |
||||
|
|
||||
|
<select id="search" resultType="com.epmet.dto.EnterpriseInterviewDTO"> |
||||
|
SELECT |
||||
|
<include refid="returnMap"/> |
||||
|
FROM enterprise_interview ei |
||||
|
LEFT JOIN key_enterprise ke ON ei.ENTERPRISE_ID = ke.ID |
||||
|
<where> |
||||
|
ei.DEL_FLAG = 0 |
||||
|
<if test="null != unitName and unitName !=''"> |
||||
|
AND ke.UNIT_NAME LIKE concat( '%', #{unitName}, '%') |
||||
|
</if> |
||||
|
<if test="null != staffs and staffs != ''"> |
||||
|
AND ei.STAFFS LIKE concat( '%', #{staffs}, '%') |
||||
|
</if> |
||||
|
<if test="null != problem and problem != ''"> |
||||
|
AND ei.PROBLEM LIKE concat( '%', #{problem}, '%') |
||||
|
</if> |
||||
|
<if test="null != remark and remark != ''"> |
||||
|
AND ei.REMARK LIKE concat( '%', #{remark}, '%') |
||||
|
</if> |
||||
|
<if test="null != interviewType and interviewType != ''"> |
||||
|
AND ei.INTERVIEW_TYPE = #{interviewType} |
||||
|
</if> |
||||
|
<if test="null != startTime and startTime != '' and null != endTime and endTime !=''"> |
||||
|
AND DATE_FORMAT(ei.INV_TIME,"%Y-%m-%d") BETWEEN DATE_FORMAT(#{startTime},"%Y-%m-%d") AND |
||||
|
DATE_FORMAT(#{endTime},"%Y-%m-%d") |
||||
|
</if> |
||||
|
<if test="null != startTime and startTime != ''"> |
||||
|
AND DATE_FORMAT(ei.INV_TIME,"%Y-%m-%d") >= DATE_FORMAT(#{startTime},"%Y-%m-%d") |
||||
|
</if> |
||||
|
<if test="null != endTime and endTime != ''"> |
||||
|
AND DATE_FORMAT(ei.INV_TIME,"%Y-%m-%d") <= DATE_FORMAT(#{endTime},"%Y-%m-%d") |
||||
|
</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,66 @@ |
|||||
|
<?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="com.epmet.dao.EnterpriseInvestigateDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.EnterpriseInvestigateEntity" id="enterpriseInvestigateMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="enterpriseId" column="ENTERPRISE_ID"/> |
||||
|
<result property="invTime" column="INV_TIME"/> |
||||
|
<result property="title" column="TITLE"/> |
||||
|
<result property="staffs" column="STAFFS"/> |
||||
|
<result property="consequence" column="CONSEQUENCE"/> |
||||
|
<result property="remark" column="REMARK"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="returnMap"> |
||||
|
ei.ID, |
||||
|
ke.UNIT_NAME, |
||||
|
ei.ENTERPRISE_ID, |
||||
|
ei.TITLE, |
||||
|
ei.STAFFS, |
||||
|
ei.CONSEQUENCE, |
||||
|
ei.REMARK, |
||||
|
ei.INV_TIME |
||||
|
</sql> |
||||
|
|
||||
|
<select id="search" resultType="com.epmet.dto.EnterpriseInvestigateDTO"> |
||||
|
SELECT |
||||
|
<include refid="returnMap"/> |
||||
|
FROM enterprise_investigate ei |
||||
|
LEFT JOIN key_enterprise ke ON ei.ENTERPRISE_ID = ke.ID |
||||
|
<where> |
||||
|
ei.DEL_FLAG = 0 |
||||
|
<if test="null != unitName and unitName !=''"> |
||||
|
AND ke.UNIT_NAME LIKE concat( '%', #{unitName}, '%') |
||||
|
</if> |
||||
|
<if test="null != title and title != ''"> |
||||
|
AND ei.TITLE LIKE concat( '%', #{title}, '%') |
||||
|
</if> |
||||
|
<if test="null != remark and remark != ''"> |
||||
|
AND ei.REMARK LIKE concat( '%', #{remark}, '%') |
||||
|
</if> |
||||
|
<if test="null != consequence and consequence != ''"> |
||||
|
AND ei.CONSEQUENCE = #{consequence} |
||||
|
</if> |
||||
|
<if test="null != startTime and startTime != '' and null != endTime and endTime !=''"> |
||||
|
AND DATE_FORMAT(ei.INV_TIME,"%Y-%m-%d") BETWEEN DATE_FORMAT(#{startTime},"%Y-%m-%d") AND |
||||
|
DATE_FORMAT(#{endTime},"%Y-%m-%d") |
||||
|
</if> |
||||
|
<if test="null != startTime and startTime != ''"> |
||||
|
AND DATE_FORMAT(ei.INV_TIME,"%Y-%m-%d") >= DATE_FORMAT(#{startTime},"%Y-%m-%d") |
||||
|
</if> |
||||
|
<if test="null != endTime and endTime != ''"> |
||||
|
AND DATE_FORMAT(ei.INV_TIME,"%Y-%m-%d") <= DATE_FORMAT(#{endTime},"%Y-%m-%d") |
||||
|
</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
</mapper> |
Loading…
Reference in new issue