Merge pull request 'feature/cl' (#274) from feature/cl into develop
Reviewed-on: http://221.226.25.34:3000/liang.cheng/weaver-hrm-organization/pulls/274
This commit is contained in:
commit
50c7a9373e
|
|
@ -411,6 +411,10 @@ public class ExtendInfoBO {
|
|||
searchConditionItem = new SearchConditionItem(ConditionType.BROWSER, fieldlabel, new String[]{fieldname}, browserbean);
|
||||
} else {
|
||||
searchConditionItem = conditionFactory.createCondition(ConditionType.BROWSER, fieldlabel, fieldname, detailtype);
|
||||
//隐藏虚拟组织
|
||||
if(searchConditionItem != null ) {
|
||||
searchConditionItem.getBrowserConditionParam().setHideVirtualOrg(true);
|
||||
}
|
||||
}
|
||||
// 岗位浏览按钮
|
||||
if ("666".equals(detailtype)) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import lombok.NoArgsConstructor;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@OrganizationTable(pageId = "0cdfd5bb-dc09-11ec-b69e-00ffcbed7508",
|
||||
fields = "t.id,t.is_used,s.control_dimension,t.plan_id,t.comp_id,t.dept_id,t.job_id,t.staff_num,t.permanent_num,t.freeze_num,t.lack_status,t.staff_desc",
|
||||
fields = "t.id,t.is_used,s.control_dimension,t.plan_id,t.comp_id,t.dept_id,t.job_id,t.staff_num,t.permanent_num,t.freeze_num,t.lack_status,t.staff_desc,t.description",
|
||||
fromSql = "FROM jcl_org_staff t inner join jcl_org_staffplan s on t.plan_id = s.id",
|
||||
orderby = "id desc",
|
||||
primarykey = "id",
|
||||
|
|
@ -91,4 +91,11 @@ public class StaffTableVO {
|
|||
@OrganizationTableColumn(labelId = 547349, text = "编制描述", width = "10%", column = "staff_desc")
|
||||
private String staffDesc;
|
||||
|
||||
/**
|
||||
* 描述说明
|
||||
*/
|
||||
@OrganizationTableColumn(labelId = 547142, text = "描述说明", width = "10%", column = "description")
|
||||
private String description;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,6 +162,8 @@ public class OrganizationFormItemUtil {
|
|||
browser.setViewAttr(viewAttr);
|
||||
browser.setIsQuickSearch(isQuickSearch);
|
||||
browser.setLabel(label);
|
||||
//隐藏虚拟组织
|
||||
browser.getBrowserConditionParam().setHideVirtualOrg(true);
|
||||
if ("161".equals(type) || "162".equals(type)) {
|
||||
fieldDbType = "browser." + fieldDbType;
|
||||
BrowserBean browserBean = new BrowserBean();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,70 @@
|
|||
package weaver.interfaces.organization.cronjob;
|
||||
|
||||
import com.engine.organization.service.impl.ChartServiceImpl;
|
||||
import com.engine.organization.util.OrganizationAssert;
|
||||
import com.engine.organization.util.OrganizationDateUtil;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
import weaver.interfaces.schedule.BaseCronJob;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2024/8/1 3:12 PM
|
||||
* @Description: 组织架构版本定时删除
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class OrgVersionDeleteCron extends BaseCronJob {
|
||||
|
||||
|
||||
|
||||
private String type;
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
|
||||
List<Integer> idList = new ArrayList<>();
|
||||
String createTime = "";
|
||||
rs.executeQuery("select id,createtime from jcl_org_chartversion order by createtime asc");
|
||||
if (rs.next()){
|
||||
idList.add(Util.getIntValue(rs.getString("id")));
|
||||
createTime = Util.null2String(rs.getString("createtime"));
|
||||
}
|
||||
|
||||
OrganizationAssert.notEmpty(idList,"未查询到组织架构图历史版本");
|
||||
|
||||
//1.type=1 删除最早版本记录日期
|
||||
//2.type=2 删除最早版本日期--往后一个月的数据
|
||||
if("2".equals(type)){
|
||||
String lastMonthDate = OrganizationDateUtil.getLastMonthDate(createTime);
|
||||
rs.executeQuery("select id from jcl_org_chartversion where createtime >= ? and createtime <= ?",createTime,lastMonthDate);
|
||||
while (rs.next()) {
|
||||
idList.add(Util.getIntValue(rs.getString("id")));
|
||||
}
|
||||
}
|
||||
//3.type=3 删除最早版本日期--往后一年的数据
|
||||
if("3".equals(type)){
|
||||
String lastYearDate = OrganizationDateUtil.getLastYearDate(createTime);
|
||||
rs.executeQuery("select id from jcl_org_chartversion where createtime >= ? and createtime <= ?",createTime,lastYearDate);
|
||||
while (rs.next()) {
|
||||
idList.add(Util.getIntValue(rs.getString("id")));
|
||||
}
|
||||
}
|
||||
|
||||
//删除数据
|
||||
ChartServiceImpl chartService = new ChartServiceImpl();
|
||||
idList.forEach(chartService::versionDelete);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package weaver.interfaces.organization.cronjob;
|
||||
|
||||
import com.engine.organization.service.impl.ChartServiceImpl;
|
||||
import com.engine.organization.util.OrganizationDateUtil;
|
||||
import weaver.hrm.User;
|
||||
import weaver.interfaces.schedule.BaseCronJob;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author liang.cheng
|
||||
* @Date 2024/8/2 9:39 AM
|
||||
* @Description: 组织架构图定时版本保存
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class OrgVersionRecordCron extends BaseCronJob {
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
ChartServiceImpl chartService = new ChartServiceImpl();
|
||||
User user = new User();
|
||||
user.setUid(1);
|
||||
|
||||
// 获取当前日期
|
||||
LocalDate today = LocalDate.now();
|
||||
String example = OrganizationDateUtil.dateExample(today);
|
||||
String description = "版本自动记录"+example;
|
||||
|
||||
Map<String, Object> params = new HashMap<String, Object>(){
|
||||
{
|
||||
put("description",description);
|
||||
}};
|
||||
|
||||
chartService.versionRecord(params,user);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue