9 changed files with 464 additions and 0 deletions
			
			
		@ -0,0 +1,68 @@ | 
				
			|||
package com.epmet.controller; | 
				
			|||
 | 
				
			|||
import com.epmet.service.IcEnterpriseService; | 
				
			|||
import org.springframework.beans.factory.annotation.Autowired; | 
				
			|||
import org.springframework.web.bind.annotation.RequestMapping; | 
				
			|||
import org.springframework.web.bind.annotation.RestController; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 企事业单位表 | 
				
			|||
 * | 
				
			|||
 * @author generator generator@elink-cn.com | 
				
			|||
 * @since v1.0.0 2022-06-17 | 
				
			|||
 */ | 
				
			|||
@RestController | 
				
			|||
@RequestMapping("enterprise") | 
				
			|||
public class IcEnterpriseController { | 
				
			|||
 | 
				
			|||
    @Autowired | 
				
			|||
    private IcEnterpriseService icEnterpriseService; | 
				
			|||
 | 
				
			|||
    // @RequestMapping("page")
 | 
				
			|||
    // public Result<PageData<IcEnterpriseDTO>> page(@RequestParam Map<String, Object> params){
 | 
				
			|||
    //     PageData<IcEnterpriseDTO> page = icEnterpriseService.page(params);
 | 
				
			|||
    //     return new Result<PageData<IcEnterpriseDTO>>().ok(page);
 | 
				
			|||
    // }
 | 
				
			|||
    //
 | 
				
			|||
    // @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
 | 
				
			|||
    // public Result<IcEnterpriseDTO> get(@PathVariable("id") String id){
 | 
				
			|||
    //     IcEnterpriseDTO data = icEnterpriseService.get(id);
 | 
				
			|||
    //     return new Result<IcEnterpriseDTO>().ok(data);
 | 
				
			|||
    // }
 | 
				
			|||
    //
 | 
				
			|||
    // @NoRepeatSubmit
 | 
				
			|||
    // @PostMapping("save")
 | 
				
			|||
    // public Result save(@RequestBody IcEnterpriseDTO dto){
 | 
				
			|||
    //     //效验数据
 | 
				
			|||
    //     ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
 | 
				
			|||
    //     icEnterpriseService.save(dto);
 | 
				
			|||
    //     return new Result();
 | 
				
			|||
    // }
 | 
				
			|||
    //
 | 
				
			|||
    // @NoRepeatSubmit
 | 
				
			|||
    // @PostMapping("update")
 | 
				
			|||
    // public Result update(@RequestBody IcEnterpriseDTO dto){
 | 
				
			|||
    //     //效验数据
 | 
				
			|||
    //     ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
 | 
				
			|||
    //     icEnterpriseService.update(dto);
 | 
				
			|||
    //     return new Result();
 | 
				
			|||
    // }
 | 
				
			|||
    //
 | 
				
			|||
    // @PostMapping("delete")
 | 
				
			|||
    // public Result delete(@RequestBody String[] ids){
 | 
				
			|||
    //     //效验数据
 | 
				
			|||
    //     AssertUtils.isArrayEmpty(ids, "id");
 | 
				
			|||
    //     icEnterpriseService.delete(ids);
 | 
				
			|||
    //     return new Result();
 | 
				
			|||
    // }
 | 
				
			|||
    //
 | 
				
			|||
    // @GetMapping("export")
 | 
				
			|||
    // public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
 | 
				
			|||
    //     List<IcEnterpriseDTO> list = icEnterpriseService.list(params);
 | 
				
			|||
    //     ExcelUtils.exportExcelToTarget(response, null, list, IcEnterpriseExcel.class);
 | 
				
			|||
    // }
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,16 @@ | 
				
			|||
package com.epmet.dao; | 
				
			|||
 | 
				
			|||
import com.epmet.commons.mybatis.dao.BaseDao; | 
				
			|||
import com.epmet.entity.IcEnterpriseEntity; | 
				
			|||
import org.apache.ibatis.annotations.Mapper; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 企事业单位表 | 
				
			|||
 * | 
				
			|||
 * @author generator generator@elink-cn.com | 
				
			|||
 * @since v1.0.0 2022-06-17 | 
				
			|||
 */ | 
				
			|||
@Mapper | 
				
			|||
public interface IcEnterpriseDao extends BaseDao<IcEnterpriseEntity> { | 
				
			|||
	 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,16 @@ | 
				
			|||
package com.epmet.dao; | 
				
			|||
 | 
				
			|||
import com.epmet.commons.mybatis.dao.BaseDao; | 
				
			|||
import com.epmet.entity.IcEnterprisePatrolRecordEntity; | 
				
			|||
import org.apache.ibatis.annotations.Mapper; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 企事业单位巡查表 | 
				
			|||
 * | 
				
			|||
 * @author generator generator@elink-cn.com | 
				
			|||
 * @since v1.0.0 2022-06-17 | 
				
			|||
 */ | 
				
			|||
@Mapper | 
				
			|||
public interface IcEnterprisePatrolRecordDao extends BaseDao<IcEnterprisePatrolRecordEntity> { | 
				
			|||
	 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,95 @@ | 
				
			|||
package com.epmet.entity; | 
				
			|||
 | 
				
			|||
import com.baomidou.mybatisplus.annotation.TableName; | 
				
			|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; | 
				
			|||
import lombok.Data; | 
				
			|||
import lombok.EqualsAndHashCode; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 企事业单位表 | 
				
			|||
 * | 
				
			|||
 * @author generator generator@elink-cn.com | 
				
			|||
 * @since v1.0.0 2022-06-17 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
@EqualsAndHashCode(callSuper=false) | 
				
			|||
@TableName("ic_enterprise") | 
				
			|||
public class IcEnterpriseEntity extends BaseEpmetEntity { | 
				
			|||
 | 
				
			|||
	private static final long serialVersionUID = 1L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 客户Id | 
				
			|||
     */ | 
				
			|||
	private String customerId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 网格Id【场所区域】 | 
				
			|||
     */ | 
				
			|||
	private String gridId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 网格所属的组织Id | 
				
			|||
     */ | 
				
			|||
	private String agencyId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * agency_id的所有上级 | 
				
			|||
     */ | 
				
			|||
	private String agencyPids; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 场所类型:来源于ic_coverage_category_dict | 
				
			|||
     */ | 
				
			|||
	private String placeType; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 场所名称 | 
				
			|||
     */ | 
				
			|||
	private String placeOrgName; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 场所地址 | 
				
			|||
     */ | 
				
			|||
	private String address; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 经度 | 
				
			|||
     */ | 
				
			|||
	private String longitude; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 纬度 | 
				
			|||
     */ | 
				
			|||
	private String latitude; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 字典value,场所规模【 | 
				
			|||
0:10人以下 | 
				
			|||
1:10-20人 | 
				
			|||
2:21-40人 | 
				
			|||
3:41-100人 | 
				
			|||
4:100人以上】 | 
				
			|||
     */ | 
				
			|||
	private String scale; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 场所负责人 | 
				
			|||
     */ | 
				
			|||
	private String personInCharge; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 负责人电话 | 
				
			|||
     */ | 
				
			|||
	private String mobile; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 来源【新增:add 导入:import 】 | 
				
			|||
     */ | 
				
			|||
	private String sourceType; | 
				
			|||
 | 
				
			|||
	/** | 
				
			|||
	 * 最新巡查结果【0:合格 1:不合格】 | 
				
			|||
	 */ | 
				
			|||
	private String latestResult; | 
				
			|||
} | 
				
			|||
@ -0,0 +1,69 @@ | 
				
			|||
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 2022-06-17 | 
				
			|||
 */ | 
				
			|||
@Data | 
				
			|||
@EqualsAndHashCode(callSuper=false) | 
				
			|||
@TableName("ic_enterprise_patrol_record") | 
				
			|||
public class IcEnterprisePatrolRecordEntity extends BaseEpmetEntity { | 
				
			|||
 | 
				
			|||
	private static final long serialVersionUID = 1L; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 客户Id | 
				
			|||
     */ | 
				
			|||
	private String customerId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 企事业单位id | 
				
			|||
     */ | 
				
			|||
	private String enterpriseId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 巡查时间 | 
				
			|||
     */ | 
				
			|||
	private Date patrolTime; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 工作人员id | 
				
			|||
     */ | 
				
			|||
	private String staffId; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 工作人员姓名 | 
				
			|||
     */ | 
				
			|||
	private String staffName; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 工作人员手机号 | 
				
			|||
     */ | 
				
			|||
	private String mobile; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 检查结果【0:合格 1:不合格】 | 
				
			|||
     */ | 
				
			|||
	private String result; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 隐患明细 | 
				
			|||
     */ | 
				
			|||
	private String detailed; | 
				
			|||
 | 
				
			|||
    /** | 
				
			|||
     * 拟复查时间 | 
				
			|||
     */ | 
				
			|||
	private Date reviewTime; | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,73 @@ | 
				
			|||
package com.epmet.service; | 
				
			|||
 | 
				
			|||
import com.epmet.commons.mybatis.service.BaseService; | 
				
			|||
import com.epmet.entity.IcEnterpriseEntity; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 企事业单位表 | 
				
			|||
 * | 
				
			|||
 * @author generator generator@elink-cn.com | 
				
			|||
 * @since v1.0.0 2022-06-17 | 
				
			|||
 */ | 
				
			|||
public interface IcEnterpriseService extends BaseService<IcEnterpriseEntity> { | 
				
			|||
 | 
				
			|||
    // /**
 | 
				
			|||
    //  * 默认分页
 | 
				
			|||
    //  *
 | 
				
			|||
    //  * @param params
 | 
				
			|||
    //  * @return PageData<IcEnterpriseDTO>
 | 
				
			|||
    //  * @author generator
 | 
				
			|||
    //  * @date 2022-06-17
 | 
				
			|||
    //  */
 | 
				
			|||
    // PageData<IcEnterpriseDTO> page(Map<String, Object> params);
 | 
				
			|||
    //
 | 
				
			|||
    // /**
 | 
				
			|||
    //  * 默认查询
 | 
				
			|||
    //  *
 | 
				
			|||
    //  * @param params
 | 
				
			|||
    //  * @return java.util.List<IcEnterpriseDTO>
 | 
				
			|||
    //  * @author generator
 | 
				
			|||
    //  * @date 2022-06-17
 | 
				
			|||
    //  */
 | 
				
			|||
    // List<IcEnterpriseDTO> list(Map<String, Object> params);
 | 
				
			|||
    //
 | 
				
			|||
    // /**
 | 
				
			|||
    //  * 单条查询
 | 
				
			|||
    //  *
 | 
				
			|||
    //  * @param id
 | 
				
			|||
    //  * @return IcEnterpriseDTO
 | 
				
			|||
    //  * @author generator
 | 
				
			|||
    //  * @date 2022-06-17
 | 
				
			|||
    //  */
 | 
				
			|||
    // IcEnterpriseDTO get(String id);
 | 
				
			|||
    //
 | 
				
			|||
    // /**
 | 
				
			|||
    //  * 默认保存
 | 
				
			|||
    //  *
 | 
				
			|||
    //  * @param dto
 | 
				
			|||
    //  * @return void
 | 
				
			|||
    //  * @author generator
 | 
				
			|||
    //  * @date 2022-06-17
 | 
				
			|||
    //  */
 | 
				
			|||
    // void save(IcEnterpriseDTO dto);
 | 
				
			|||
    //
 | 
				
			|||
    // /**
 | 
				
			|||
    //  * 默认更新
 | 
				
			|||
    //  *
 | 
				
			|||
    //  * @param dto
 | 
				
			|||
    //  * @return void
 | 
				
			|||
    //  * @author generator
 | 
				
			|||
    //  * @date 2022-06-17
 | 
				
			|||
    //  */
 | 
				
			|||
    // void update(IcEnterpriseDTO dto);
 | 
				
			|||
    //
 | 
				
			|||
    // /**
 | 
				
			|||
    //  * 批量删除
 | 
				
			|||
    //  *
 | 
				
			|||
    //  * @param ids
 | 
				
			|||
    //  * @return void
 | 
				
			|||
    //  * @author generator
 | 
				
			|||
    //  * @date 2022-06-17
 | 
				
			|||
    //  */
 | 
				
			|||
    // void delete(String[] ids);
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,70 @@ | 
				
			|||
package com.epmet.service.impl; | 
				
			|||
 | 
				
			|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
				
			|||
import com.epmet.dao.IcEnterpriseDao; | 
				
			|||
import com.epmet.entity.IcEnterpriseEntity; | 
				
			|||
import com.epmet.service.IcEnterpriseService; | 
				
			|||
import org.springframework.stereotype.Service; | 
				
			|||
 | 
				
			|||
/** | 
				
			|||
 * 企事业单位表 | 
				
			|||
 * | 
				
			|||
 * @author generator generator@elink-cn.com | 
				
			|||
 * @since v1.0.0 2022-06-17 | 
				
			|||
 */ | 
				
			|||
@Service | 
				
			|||
public class IcEnterpriseServiceImpl extends BaseServiceImpl<IcEnterpriseDao, IcEnterpriseEntity> implements IcEnterpriseService { | 
				
			|||
 | 
				
			|||
    // @Override
 | 
				
			|||
    // public PageData<IcEnterpriseDTO> page(Map<String, Object> params) {
 | 
				
			|||
    //     IPage<IcEnterpriseEntity> page = baseDao.selectPage(
 | 
				
			|||
    //             getPage(params, FieldConstant.CREATED_TIME, false),
 | 
				
			|||
    //             getWrapper(params)
 | 
				
			|||
    //     );
 | 
				
			|||
    //     return getPageData(page, IcEnterpriseDTO.class);
 | 
				
			|||
    // }
 | 
				
			|||
    //
 | 
				
			|||
    // @Override
 | 
				
			|||
    // public List<IcEnterpriseDTO> list(Map<String, Object> params) {
 | 
				
			|||
    //     List<IcEnterpriseEntity> entityList = baseDao.selectList(getWrapper(params));
 | 
				
			|||
    //
 | 
				
			|||
    //     return ConvertUtils.sourceToTarget(entityList, IcEnterpriseDTO.class);
 | 
				
			|||
    // }
 | 
				
			|||
    //
 | 
				
			|||
    // private QueryWrapper<IcEnterpriseEntity> getWrapper(Map<String, Object> params){
 | 
				
			|||
    //     String id = (String)params.get(FieldConstant.ID_HUMP);
 | 
				
			|||
    //
 | 
				
			|||
    //     QueryWrapper<IcEnterpriseEntity> wrapper = new QueryWrapper<>();
 | 
				
			|||
    //     wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
 | 
				
			|||
    //
 | 
				
			|||
    //     return wrapper;
 | 
				
			|||
    // }
 | 
				
			|||
    //
 | 
				
			|||
    // @Override
 | 
				
			|||
    // public IcEnterpriseDTO get(String id) {
 | 
				
			|||
    //     IcEnterpriseEntity entity = baseDao.selectById(id);
 | 
				
			|||
    //     return ConvertUtils.sourceToTarget(entity, IcEnterpriseDTO.class);
 | 
				
			|||
    // }
 | 
				
			|||
    //
 | 
				
			|||
    // @Override
 | 
				
			|||
    // @Transactional(rollbackFor = Exception.class)
 | 
				
			|||
    // public void save(IcEnterpriseDTO dto) {
 | 
				
			|||
    //     IcEnterpriseEntity entity = ConvertUtils.sourceToTarget(dto, IcEnterpriseEntity.class);
 | 
				
			|||
    //     insert(entity);
 | 
				
			|||
    // }
 | 
				
			|||
    //
 | 
				
			|||
    // @Override
 | 
				
			|||
    // @Transactional(rollbackFor = Exception.class)
 | 
				
			|||
    // public void update(IcEnterpriseDTO dto) {
 | 
				
			|||
    //     IcEnterpriseEntity entity = ConvertUtils.sourceToTarget(dto, IcEnterpriseEntity.class);
 | 
				
			|||
    //     updateById(entity);
 | 
				
			|||
    // }
 | 
				
			|||
    //
 | 
				
			|||
    // @Override
 | 
				
			|||
    // @Transactional(rollbackFor = Exception.class)
 | 
				
			|||
    // public void delete(String[] ids) {
 | 
				
			|||
    //     // 逻辑删除(@TableLogic 注解)
 | 
				
			|||
    //     baseDao.deleteBatchIds(Arrays.asList(ids));
 | 
				
			|||
    // }
 | 
				
			|||
 | 
				
			|||
} | 
				
			|||
@ -0,0 +1,31 @@ | 
				
			|||
<?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.IcEnterpriseDao"> | 
				
			|||
 | 
				
			|||
    <resultMap type="com.epmet.entity.IcEnterpriseEntity" id="icEnterpriseMap"> | 
				
			|||
        <result property="id" column="ID"/> | 
				
			|||
        <result property="customerId" column="CUSTOMER_ID"/> | 
				
			|||
        <result property="gridId" column="GRID_ID"/> | 
				
			|||
        <result property="agencyId" column="AGENCY_ID"/> | 
				
			|||
        <result property="agencyPids" column="AGENCY_PIDS"/> | 
				
			|||
        <result property="placeType" column="PLACE_TYPE"/> | 
				
			|||
        <result property="placeOrgName" column="PLACE_ORG_NAME"/> | 
				
			|||
        <result property="address" column="ADDRESS"/> | 
				
			|||
        <result property="longitude" column="LONGITUDE"/> | 
				
			|||
        <result property="latitude" column="LATITUDE"/> | 
				
			|||
        <result property="scale" column="SCALE"/> | 
				
			|||
        <result property="personInCharge" column="PERSON_IN_CHARGE"/> | 
				
			|||
        <result property="mobile" column="MOBILE"/> | 
				
			|||
        <result property="sourceType" column="SOURCE_TYPE"/> | 
				
			|||
        <result property="latestResult" column="LATEST_RESULT"/> | 
				
			|||
        <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> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
</mapper> | 
				
			|||
@ -0,0 +1,26 @@ | 
				
			|||
<?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.IcEnterprisePatrolRecordDao"> | 
				
			|||
 | 
				
			|||
    <resultMap type="com.epmet.entity.IcEnterprisePatrolRecordEntity" id="icEnterpriseRecordMap"> | 
				
			|||
        <result property="id" column="ID"/> | 
				
			|||
        <result property="customerId" column="CUSTOMER_ID"/> | 
				
			|||
        <result property="enterpriseId" column="ENTERPRISE_ID"/> | 
				
			|||
        <result property="patrolTime" column="PATROL_TIME"/> | 
				
			|||
        <result property="staffId" column="STAFF_ID"/> | 
				
			|||
        <result property="staffName" column="STAFF_NAME"/> | 
				
			|||
        <result property="mobile" column="MOBILE"/> | 
				
			|||
        <result property="result" column="RESULT"/> | 
				
			|||
        <result property="detailed" column="DETAILED"/> | 
				
			|||
        <result property="reviewTime" column="REVIEW_TIME"/> | 
				
			|||
        <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> | 
				
			|||
 | 
				
			|||
 | 
				
			|||
</mapper> | 
				
			|||
					Loading…
					
					
				
		Reference in new issue