Compare commits
2 Commits
5adcb95c28
...
0b3bb2fd52
| Author | SHA1 | Date |
|---|---|---|
|
|
0b3bb2fd52 | |
|
|
56a58f8b47 |
|
|
@ -12,4 +12,9 @@
|
||||||
/build.gradle
|
/build.gradle
|
||||||
/gradle/
|
/gradle/
|
||||||
/secondev-chapanda-attend/build
|
/secondev-chapanda-attend/build
|
||||||
/secondev-chapanda-workflow/build
|
/secondev-chapanda-workflow/build
|
||||||
|
|
||||||
|
/buildSrc/
|
||||||
|
|
||||||
|
/secDevClasses/
|
||||||
|
/secDevLib/
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
// id 'com.weaver.ecode.gradle.plugin.BuildArchPlugin'
|
id 'com.weaver.ecode.gradle.plugin.BuildArchPlugin'
|
||||||
}
|
}
|
||||||
|
|
||||||
group 'com.weaver.seconddev'
|
group 'com.weaver.seconddev'
|
||||||
|
|
@ -22,7 +22,7 @@ def ignoredProjectNames = []
|
||||||
configure(allprojects) { project ->
|
configure(allprojects) { project ->
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
// apply plugin: 'com.weaver.ecode.gradle.plugin.BuildArchPlugin'
|
apply plugin: 'com.weaver.ecode.gradle.plugin.BuildArchPlugin'
|
||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
options.encoding = 'UTF-8'
|
options.encoding = 'UTF-8'
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ 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.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
|
|
@ -21,7 +20,7 @@ public class AttendSyncFormController {
|
||||||
|
|
||||||
@GetMapping("/getForm")
|
@GetMapping("/getForm")
|
||||||
@ApiOperation("获取表单")
|
@ApiOperation("获取表单")
|
||||||
public WeaResult<WeaForm> getFrom(@RequestParam(value = "id", required = false) Long id) {
|
public WeaResult<WeaForm> getFrom() {
|
||||||
return WeaResult.success(attendSyncFormService.getForm());
|
return WeaResult.success(attendSyncFormService.getForm());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.weaver.seconddev.chapanda.controller;
|
||||||
|
|
||||||
|
import com.weaver.common.authority.annotation.WeaPermission;
|
||||||
|
import com.weaver.common.base.entity.result.WeaResult;
|
||||||
|
import com.weaver.seconddev.chapanda.entity.po.OrganizationChange;
|
||||||
|
import com.weaver.seconddev.chapanda.service.OrganizationChangeService;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/secondev/organization/change")
|
||||||
|
@WeaPermission(publicPermission = true)
|
||||||
|
public class OrganizationChangeController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OrganizationChangeService organizationChangeService;
|
||||||
|
|
||||||
|
@GetMapping("/selectChangeList")
|
||||||
|
@ApiOperation("获取组织变更信息")
|
||||||
|
public WeaResult<List<OrganizationChange>> selectChangeList(@RequestParam(required = true) String changeDate,
|
||||||
|
@RequestParam(required = true) Long departmentId) {
|
||||||
|
return WeaResult.success(organizationChangeService.selectChangeList(changeDate,departmentId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,127 @@
|
||||||
|
package com.weaver.seconddev.chapanda.entity.po;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
public class EbBaseField {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long formDataId;
|
||||||
|
|
||||||
|
private Integer dataIndex;
|
||||||
|
|
||||||
|
private Integer isFlow;
|
||||||
|
|
||||||
|
private Integer dataStatus;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
private String tenantKey;
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
|
||||||
|
private Long updater;
|
||||||
|
|
||||||
|
private Integer deleteType;
|
||||||
|
|
||||||
|
private Integer ftStatus;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getFormDataId() {
|
||||||
|
return formDataId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormDataId(Long formDataId) {
|
||||||
|
this.formDataId = formDataId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDataIndex() {
|
||||||
|
return dataIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataIndex(Integer dataIndex) {
|
||||||
|
this.dataIndex = dataIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsFlow() {
|
||||||
|
return isFlow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsFlow(Integer isFlow) {
|
||||||
|
this.isFlow = isFlow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDataStatus() {
|
||||||
|
return dataStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataStatus(Integer dataStatus) {
|
||||||
|
this.dataStatus = dataStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTenantKey() {
|
||||||
|
return tenantKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTenantKey(String tenantKey) {
|
||||||
|
this.tenantKey = tenantKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCreator() {
|
||||||
|
return creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreator(Long creator) {
|
||||||
|
this.creator = creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUpdater() {
|
||||||
|
return updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdater(Long updater) {
|
||||||
|
this.updater = updater;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDeleteType() {
|
||||||
|
return deleteType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleteType(Integer deleteType) {
|
||||||
|
this.deleteType = deleteType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFtStatus() {
|
||||||
|
return ftStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFtStatus(Integer ftStatus) {
|
||||||
|
this.ftStatus = ftStatus;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
package com.weaver.seconddev.chapanda.entity.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@TableName("uf_zzbgjl")
|
||||||
|
public class OrganizationChange extends EbBaseField {
|
||||||
|
|
||||||
|
private String departmentCode;
|
||||||
|
|
||||||
|
private Integer operateType;
|
||||||
|
|
||||||
|
private String changeReason;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date changeDate;
|
||||||
|
|
||||||
|
public String getDepartmentCode() {
|
||||||
|
return departmentCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartmentCode(String departmentCode) {
|
||||||
|
this.departmentCode = departmentCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOperateType() {
|
||||||
|
return operateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOperateType(Integer operateType) {
|
||||||
|
this.operateType = operateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChangeReason() {
|
||||||
|
return changeReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChangeReason(String changeReason) {
|
||||||
|
this.changeReason = changeReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getChangeDate() {
|
||||||
|
return changeDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setChangeDate(Date changeDate) {
|
||||||
|
this.changeDate = changeDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.weaver.seconddev.chapanda.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.weaver.seconddev.chapanda.entity.po.OrganizationChange;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface OrganizationChangeMapper extends BaseMapper<OrganizationChange> {
|
||||||
|
|
||||||
|
List<OrganizationChange> selectChangeList(@Param("tenantKey")String tenantKey,@Param("departmentCode") String departmentCode,
|
||||||
|
@Param("changeDate") String changeDate,@Param("dbName") String dbName);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.weaver.seconddev.chapanda.service;
|
||||||
|
|
||||||
|
import com.weaver.seconddev.chapanda.entity.po.OrganizationChange;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface OrganizationChangeService {
|
||||||
|
List<OrganizationChange> selectChangeList(String changeDate, Long departmentId);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.weaver.seconddev.chapanda.service.impl;
|
||||||
|
|
||||||
|
import com.weaver.common.cache.tablecache.impl.ComInfoCache;
|
||||||
|
import com.weaver.common.hrm.cache.HrmDepartmentComInfo;
|
||||||
|
import com.weaver.seconddev.chapanda.entity.po.OrganizationChange;
|
||||||
|
import com.weaver.seconddev.chapanda.mapper.OrganizationChangeMapper;
|
||||||
|
import com.weaver.seconddev.chapanda.service.OrganizationChangeService;
|
||||||
|
import com.weaver.teams.domain.user.SimpleEmployee;
|
||||||
|
import com.weaver.teams.security.context.UserContext;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class OrganizationChangeServiceImpl implements OrganizationChangeService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OrganizationChangeMapper organizationChangeMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ComInfoCache comInfoCache;
|
||||||
|
|
||||||
|
@Value("${attend.chaPanda.ebuider.dbName:e10_common}")
|
||||||
|
private String dbName;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OrganizationChange> selectChangeList(String changeDate, Long departmentId) {
|
||||||
|
HrmDepartmentComInfo departmentComInfo = (HrmDepartmentComInfo)this.comInfoCache.getCacheById(HrmDepartmentComInfo.class, departmentId);
|
||||||
|
String departmentCode = "";
|
||||||
|
if (departmentComInfo != null) {
|
||||||
|
departmentCode = departmentComInfo.getCode();
|
||||||
|
}
|
||||||
|
SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
|
||||||
|
String tenantKey = simpleEmployee.getTenantKey();
|
||||||
|
return organizationChangeMapper.selectChangeList(tenantKey,departmentCode,changeDate,dbName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?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.weaver.seconddev.chapanda.mapper.OrganizationChangeMapper">
|
||||||
|
|
||||||
|
<resultMap id="OrganizationChangeMap" type="com.weaver.seconddev.chapanda.entity.po.OrganizationChange">
|
||||||
|
<!-- EbBaseField字段 -->
|
||||||
|
<result column="update_time" property="updateTime"/>
|
||||||
|
|
||||||
|
<!-- OrganizationChange特有字段 -->
|
||||||
|
<result column="bgzzbh" property="departmentCode"/>
|
||||||
|
<result column="czlx" property="operateType"/>
|
||||||
|
<result column="bgly" property="changeReason"/>
|
||||||
|
<result column="bgsxrq" property="changeDate"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="selectChangeList" resultMap="OrganizationChangeMap">
|
||||||
|
SELECT
|
||||||
|
update_time,
|
||||||
|
bgzzbh,
|
||||||
|
czlx,
|
||||||
|
bgly,
|
||||||
|
bgsxrq
|
||||||
|
FROM ${dbName}.uf_zzbgjl
|
||||||
|
WHERE delete_type = 0
|
||||||
|
AND tenant_key = #{tenantKey}
|
||||||
|
<if test="departmentCode != null and departmentCode != ''">
|
||||||
|
AND bgzzbh = #{departmentCode}
|
||||||
|
</if>
|
||||||
|
<if test="changeDate != null and changeDate != ''">
|
||||||
|
AND bgsxrq = #{changeDate}
|
||||||
|
</if>
|
||||||
|
ORDER BY update_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue