Commit ea5e0ba3 by 邓实川

Merge branch 'develop' of

http://120.24.24.239:8082/8timerv2/8timerapiv200.git into dsc

Conflicts:
	src/main/java/cn/timer/api/controller/yggl/YgglController.java
parents 606ee3ea 4b1f9eaf
This source diff could not be displayed because it is too large. You can view the blob instead.
package cn.timer.api.dao.yggl;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.dto.yggl.YgAreaDto;
/**
* 地区表
* @author Tang 2019-11-15
*/
@Repository
public interface YgAreaDtoMapper extends BaseMapper<YgAreaDto> {
}
package cn.timer.api.dao.yggl;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.dto.yggl.YgCityDto;
import cn.timer.api.dto.yggl.YgProDto;
/**
* 城市表
* @author Tang 2019-11-15
*/
@Repository
public interface YgCityDtoMapper extends BaseMapper<YgCityDto> {
}
package cn.timer.api.dao.yggl;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.dto.yggl.YgmzDto;
/**
* 民族表
* @author Tang 2019-11-15
*/
@Repository
public interface YgMzDtoMapper extends BaseMapper<YgmzDto> {
}
package cn.timer.api.dao.yggl;
import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.timer.api.dto.yggl.YgProDto;
/**
* 省份表
* @author Tang 2019-11-15
*/
@Repository
public interface YgProDtoMapper extends BaseMapper<YgProDto> {
}
/**
* @date 2020年3月10日
* @author 翁东州
* @方法中文名称:
*/
package cn.timer.api.dto.yggl;
import java.util.List;
/**
* @date 2020年3月10日
* @author 翁东州
* @方法中文名称:
*/
public interface IYgjgDto {
List<String> exePunish();
}
package cn.timer.api.dto.yggl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PunishFactory {
private static Map<String,IYgjgDto> punishMap = new HashMap<String,IYgjgDto>();
private PunishFactory() {}
private static final IYgjgDto EMPTY = new EmptyPunish();
//获取
public static IYgjgDto getPunish(String state) {
IYgjgDto result = punishMap.get(state);
return result == null ? EMPTY : result;
}
//将处罚对象注册到这里
public static void registerPunish(String state,IYgjgDto o){
punishMap.put(state, o);
}
private static class EmptyPunish implements IYgjgDto {
public List<String> exePunish() {
return null;
}
}
}
\ No newline at end of file
package cn.timer.api.dto.yggl;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper;
import cn.timer.api.dao.yggl.YgAreaDtoMapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Tang 2019-11-15
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("pro_city_area_class")
@ApiModel("籍贯:地区")
public class YgAreaDto implements IYgjgDto,InitializingBean{
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="编号",example="1")
private Integer id;
@ApiModelProperty(value="省编码 ",example="省编码")
private Integer province;
@ApiModelProperty(value="市编码",example="市编码")
private Integer city;
@ApiModelProperty(value="名字",example="名字")
private String name;
@Autowired
private YgAreaDtoMapper ygAreaDtoMapper;
public List<String> exePunish() {
List<YgAreaDto> areaList = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper).orderByAsc(YgAreaDto::getProvince).list();
List<String> a =new ArrayList<String>();
for (YgAreaDto area : areaList) { a.add(area.getName()); }
return a;
}
public void afterPropertiesSet(){
PunishFactory.registerPunish("area", this);
}
}
package cn.timer.api.dto.yggl;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper;
import cn.timer.api.dao.yggl.YgCityDtoMapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Tang 2019-11-15
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("pro_city_class")
@ApiModel("籍贯:城市")
public class YgCityDto implements IYgjgDto,InitializingBean{
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="编号",example="1")
private Integer id;
@ApiModelProperty(value="省编码 ",example="省编码")
private Integer province;
@ApiModelProperty(value="市编码",example="市编码")
private Integer city;
@ApiModelProperty(value="名字",example="名字")
private String name;
@Autowired
private YgCityDtoMapper ygCityDtoMapper;
public List<String> exePunish() {
List<YgCityDto> cityList = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).orderByAsc(YgCityDto::getProvince).list();
List<String> c =new ArrayList<String>();
for (YgCityDto city : cityList) { c.add(city.getName()); }
return c;
}
public void afterPropertiesSet(){
PunishFactory.registerPunish("city", this);
}
}
package cn.timer.api.dto.yggl;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author weng 2020-3-13
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class YgDrjqbDto {
@ApiModelProperty(value="编号",example="1")
private Integer id;
@ApiModelProperty(value="公司内部工号 ",example="公司内部工号")
private String ygnbgh;
@ApiModelProperty(value="姓名 ",example="姓名")
private String name;
@ApiModelProperty(value="手机号码 ",example="12345678901")
private String phone;
@ApiModelProperty(value="性别 ",example="男")
private String sex;
@ApiModelProperty(value="证件号码 ",example="123456789012345678")
private String zj;
@ApiModelProperty(value="一级部门 ",example="一级部门")
private String oneb;
@ApiModelProperty(value="二级部门 ",example="二级部门 ")
private String twob;
@ApiModelProperty(value="三级部门 ",example="三级部门 ")
private String threeb;
@ApiModelProperty(value="四级部门 ",example="四级部门 ")
private String fourb;
@ApiModelProperty(value="岗位 ",example="岗位")
private String gw;
@ApiModelProperty(value="工作性质 ",example="1")
private String jobType;
@ApiModelProperty(value="员工状态 ",example="1")
private String jobStatus;
@ApiModelProperty(value="入职日期 ",example="2020-3-12")
private String rzTime;
@ApiModelProperty(value="试用期 ",example="试用期")
private String syq;
@ApiModelProperty(value="专业 ",example="专业")
private String zy;
@ApiModelProperty(value="工作地点 ",example="工作地点")
private String address;
@ApiModelProperty(value="户籍地址 ",example="户籍地址")
private String hkAddress;
@ApiModelProperty(value="QQ ",example="123456789")
private String qq;
@ApiModelProperty(value="微信 ",example="weixin123456789")
private String weixin;
@ApiModelProperty(value="个人邮箱 ",example="个人邮箱")
private String email;
@ApiModelProperty(value="错误信息",example="错误信息")
private String error;
@ApiModelProperty(value="有部门id了!",example="0")
private Integer havebmid;
}
package cn.timer.api.dto.yggl;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author weng 2020-3-13
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class YgDrsDto {
@ApiModelProperty(value="导入列表")
List<YgDrjqbDto> drList;
@ApiModelProperty(value="错误列表")
List<YgDrjqbDto> errorList;
@ApiModelProperty(value="组织机构代码")
Integer orgCode;
}
package cn.timer.api.dto.yggl;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.service.additional.query.impl.LambdaQueryChainWrapper;
import cn.timer.api.dao.yggl.YgProDtoMapper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Tang 2019-11-15
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("province_class")
@ApiModel("籍贯:省份")
public class YgProDto implements IYgjgDto,InitializingBean{
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="编号",example="1")
private Integer id;
@ApiModelProperty(value="省编码 ",example="省编码")
private Integer province;
@ApiModelProperty(value="名字",example="名字")
private String name;
@Autowired
private YgProDtoMapper ygProDtoMapper;
public List<String> exePunish() {
List<YgProDto> proList = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).orderByAsc(YgProDto::getProvince).list();
List<String> pList =new ArrayList<String>();
for (YgProDto pro : proList) { pList.add(pro.getName()); }
return pList;
}
public void afterPropertiesSet(){
System.out.println("初始化注入成功!");
PunishFactory.registerPunish("pro", this);
}
}
/**
* @date 2020年3月10日
* @author 翁东州
* @方法中文名称:
*/
package cn.timer.api.dto.yggl;
import java.io.Serializable;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @date 2020年3月10日
* @author 翁东州
* @方法中文名称:
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class YgjgDto implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value="省市区分类id",example="省pro,市city,区area")
private Integer type;
@ApiModelProperty(value="省市区籍贯id",example="110000")
private Integer jgid;
}
package cn.timer.api.dto.yggl;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Tang 2019-11-15
*/
@Entity
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("nation_class")
@ApiModel("民族")
public class YgmzDto {
@Id
@GeneratedValue
@TableId (type = IdType.AUTO)
@ApiModelProperty(value="编号",example="1")
private Integer id;
@ApiModelProperty(value="民族名称 ",example="民族名称")
private String name;
@ApiModelProperty(value="拼音",example="pinyin")
private String pinyin;
@ApiModelProperty(value="简写",example="PY")
private String letter;
@ApiModelProperty(value="这个才是排序",example="number")
private Integer number;
@ApiModelProperty(value="排序",example="排序")
private String sort;
}
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