BUG修复
This commit is contained in:
parent
d2f6fa693a
commit
946354b32d
|
|
@ -61,7 +61,7 @@ public class CompListDTO {
|
|||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
@TableTitle(title = "是否启用", dataIndex = "canceled", key = "canceled")
|
||||
@TableTitle(title = "封存", dataIndex = "canceled", key = "canceled")
|
||||
private Integer canceled;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class DepartmentListDTO {
|
|||
/**
|
||||
* 禁用标记
|
||||
*/
|
||||
@TableTitle(title = "是否启用", dataIndex = "canceled", key = "canceled")
|
||||
@TableTitle(title = "封存", dataIndex = "canceled", key = "canceled")
|
||||
private int canceled;
|
||||
/**
|
||||
* 操作列
|
||||
|
|
|
|||
|
|
@ -15,4 +15,6 @@ public interface ImportMapper {
|
|||
List<HrmFormFieldPO> getImportFields(@Param("languageId") Integer languageId, @Param("groupType") Integer groupType);
|
||||
|
||||
List<HrmFormFieldPO> getImportFieldInfo(@Param("languageId") Integer languageId, @Param("groupType") Integer groupType, @Param("labelName") String labelName);
|
||||
|
||||
List<String> getResourceExceptedFields();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,13 +9,39 @@
|
|||
inner join htmllabelinfo b on a.fieldlabel = b.indexid and b.languageid = #{languageId}
|
||||
inner join hrm_fieldgroup c on a.groupid = c.id
|
||||
where a.fieldhtmltype != '6' and c.grouptype = #{groupType}
|
||||
and a.isuse = 1
|
||||
</select>
|
||||
<select id="getImportFieldInfo" resultType="com.engine.organization.entity.jclimport.po.HrmFormFieldPO">
|
||||
select a.fieldid , a.fieldname , b.labelname , a.issystem, a.ismand, a.fielddbtype , a.fieldhtmltype , a.type , a.dmlurl
|
||||
select a.fieldid,
|
||||
a.fieldname,
|
||||
b.labelname,
|
||||
a.issystem,
|
||||
a.ismand,
|
||||
a.fielddbtype,
|
||||
a.fieldhtmltype,
|
||||
a.type,
|
||||
a.dmlurl
|
||||
from hrm_formfield a
|
||||
inner join htmllabelinfo b on a.fieldlabel = b.indexid and b.languageid = #{languageId}
|
||||
inner join hrm_fieldgroup c on a.groupid = c.id
|
||||
where a.fieldhtmltype != '6' and c.grouptype = #{groupType}
|
||||
and b.labelname = #{labelName}
|
||||
and a.isuse = 1
|
||||
</select>
|
||||
<select id="getResourceExceptedFields" resultType="java.lang.String">
|
||||
select FIELDNAME
|
||||
from cus_formdict
|
||||
where id in (select fieldid
|
||||
from cus_formfield
|
||||
where scope = 'HrmCustomFieldByInfoType'
|
||||
and scopeid = 3
|
||||
and dmlUrl in ('sequenceBrowser', 'schemeBrowser', 'LevelBrowser', 'gradeBrowser')
|
||||
union
|
||||
select fieldid
|
||||
from cus_formfield
|
||||
where scope = 'HrmCustomFieldByInfoType'
|
||||
and hrm_fieldlable = '职等职级'
|
||||
and scopeid = 3
|
||||
and dmlUrl = (select max(mainid) from mode_customtreedetail where tablename = 'v_jcl_zdzjs'))
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -37,9 +37,4 @@ public interface ResourceMapper {
|
|||
* @return
|
||||
*/
|
||||
List<Long> getIdByKeyField(@Param("keyField") String keyField, @Param("keyFieldValue") String keyFieldValue);
|
||||
|
||||
String getEcResourceId(@Param("jclResourceId") String jclResourceId);
|
||||
|
||||
Long getJclResourceId(@Param("ecResourceId") String ecResourceId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,20 +143,6 @@
|
|||
and ${keyField} = #{keyFieldValue}
|
||||
</select>
|
||||
|
||||
<select id="getEcResourceId" resultType="java.lang.String">
|
||||
select a.id
|
||||
from hrmresource a
|
||||
inner join jcl_org_hrmresource b on a.uuid = b.uuid
|
||||
where b.id = #{jclResourceId}
|
||||
</select>
|
||||
|
||||
<select id="getJclResourceId" resultType="java.lang.Long">
|
||||
select a.id
|
||||
from jcl_org_hrmresource a
|
||||
inner join hrmresource b on a.uuid = b.uuid
|
||||
where b.id = #{ecResourceId}
|
||||
</select>
|
||||
|
||||
<sql id="likeSql">
|
||||
<if test="param.lastName != null and param.lastName != ''">
|
||||
AND t.last_name like CONCAT('%',#{param.lastName},'%')
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ import com.engine.organization.enums.ModuleTypeEnum;
|
|||
import com.engine.organization.mapper.codesetting.CodeRuleMapper;
|
||||
import com.engine.organization.mapper.extend.*;
|
||||
import com.engine.organization.mapper.personnelcard.CardButtonMapper;
|
||||
import com.engine.organization.mapper.resource.ResourceMapper;
|
||||
import com.engine.organization.service.ExtService;
|
||||
import com.engine.organization.util.OrganizationAssert;
|
||||
import com.engine.organization.util.db.DBType;
|
||||
|
|
@ -74,8 +73,7 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
}
|
||||
List<String> readOnlyFieldList = new ArrayList<>(Arrays.asList(readOnlyFields));
|
||||
if ("4".equals(extendType) && noEditRight(user)) {
|
||||
String ecResourceId = MapperProxyFactory.getProxy(ResourceMapper.class).getEcResourceId(String.valueOf(id));
|
||||
if (Util.null2String(user.getUID()).equals(ecResourceId)) {
|
||||
if (Util.null2String(user.getUID()).equals(String.valueOf(id))) {
|
||||
List<String> readOnlyList = infoPOList.stream().filter(item -> !"1".equals(Util.null2String(item.getIsModify()))).map(ExtendInfoPO::getFieldName).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(readOnlyList)) {
|
||||
readOnlyFieldList.addAll(readOnlyList);
|
||||
|
|
@ -162,8 +160,7 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
boolean checkRight = true;
|
||||
if (2 == viewAttr && "4".equals(extendType) && noEditRight(user)) {
|
||||
checkRight = false;
|
||||
String ecResourceId = MapperProxyFactory.getProxy(ResourceMapper.class).getEcResourceId(String.valueOf(id));
|
||||
if (Util.null2String(user.getUID()).equals(ecResourceId)) {
|
||||
if (Util.null2String(user.getUID()).equals(String.valueOf(id))) {
|
||||
infoPOList.removeIf(item -> !"1".equals(Util.null2String(item.getIsModify())));
|
||||
} else {
|
||||
infoPOList = new ArrayList<>();
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import org.apache.commons.collections.CollectionUtils;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.json.JSONObject;
|
||||
import weaver.blog.BlogShareManager;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.cowork.CoworkShareManager;
|
||||
import weaver.crm.CrmShareBase;
|
||||
import weaver.docs.search.DocSearchComInfo;
|
||||
|
|
@ -182,8 +183,17 @@ public class HrmPersonnelCardServiceImpl extends Service implements HrmPersonnel
|
|||
String fieldName = hfm.getFieldname();
|
||||
JSONObject hrmFieldConf = hfm.getHrmFieldConf(fieldName);
|
||||
String fieldLabel = Util.toScreen(SystemEnv.getHtmlLabelName(hrmFieldConf.getInt("fieldlabel"), user.getLanguage()), user.getLanguage());
|
||||
String hrmData = hfm.getHrmData(fieldName);
|
||||
String fieldValue = hfm.getFieldvalue(null, user, null, null, hrmFieldConf.getInt("id"), hrmFieldConf.getInt("fieldhtmltype"), hrmFieldConf.getInt("type"), hrmData, 0, fieldName);
|
||||
String hrmData = "";
|
||||
if (hfm.isBaseField(fieldName)) {
|
||||
hrmData = hfm.getHrmData(fieldName);
|
||||
} else {
|
||||
RecordSet recordSet = new RecordSet();
|
||||
recordSet.execute("select " + fieldName + " from cus_fielddata where SCOPE = '" + cusTreeFormPO.getScope() + "' and SCOPEID =" + cusTreeFormPO.getId() + " and id = " + uId);
|
||||
if (recordSet.next()) {
|
||||
hrmData = recordSet.getString(fieldName);
|
||||
}
|
||||
}
|
||||
String fieldValue = hfm.getFieldvalue(null, user, null, hrmFieldConf.getString("dmlurl"), hrmFieldConf.getInt("id"), hrmFieldConf.getInt("fieldhtmltype"), hrmFieldConf.getInt("type"), hrmData, 0, fieldName);
|
||||
itemList.add(Item.builder().fieldId(fieldLabel).fieldValue(fieldValue).build());
|
||||
}
|
||||
formItem.setItems(itemList);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import com.engine.organization.entity.scheme.po.SchemePO;
|
|||
import com.engine.organization.enums.OrgImportEnum;
|
||||
import com.engine.organization.mapper.employee.EmployeeMapper;
|
||||
import com.engine.organization.mapper.extend.ExtendInfoMapper;
|
||||
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
|
||||
import com.engine.organization.mapper.jclimport.ImportMapper;
|
||||
import com.engine.organization.mapper.jclimport.JclImportHistoryDetailMapper;
|
||||
import com.engine.organization.mapper.resource.ResourceMapper;
|
||||
import com.engine.organization.mapper.scheme.GradeMapper;
|
||||
|
|
@ -60,14 +60,8 @@ import java.util.stream.Collectors;
|
|||
* @version: 1.0
|
||||
*/
|
||||
public class ImportCommonServiceImpl extends Service implements ImportCommonService {
|
||||
/**
|
||||
* extend_group
|
||||
*/
|
||||
private static final Long JOB_TYPE = 3L;
|
||||
private static final Long RESOURCE_TYPE = 4L;
|
||||
|
||||
private static final String RIGHT_NAME = "DataImport:All";
|
||||
private static final String HRM_RESOURCE = "hrmresource";
|
||||
|
||||
static Map<String, ExtendInfoPO> importFieldsMap;
|
||||
|
||||
|
|
@ -89,8 +83,8 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
return MapperProxyFactory.getProxy(ExtendInfoMapper.class);
|
||||
}
|
||||
|
||||
private SystemDataMapper getSystemDataMapper() {
|
||||
return MapperProxyFactory.getProxy(SystemDataMapper.class);
|
||||
private ImportMapper getImportMapper() {
|
||||
return MapperProxyFactory.getProxy(ImportMapper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -115,12 +109,17 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
return DepartmentImport.getImportFields(user, excludeFields);
|
||||
case "jobtitle":
|
||||
case "resource":
|
||||
List<String> resourceExceptedFields = getImportMapper().getResourceExceptedFields();
|
||||
if (CollectionUtils.isNotEmpty(resourceExceptedFields)) {
|
||||
excludeFields.addAll(resourceExceptedFields);
|
||||
}
|
||||
excludeFields.add("resourceimageid");
|
||||
excludeFields.add("messagerurl");
|
||||
excludeFields.add("workyear");
|
||||
excludeFields.add("companyworkyear");
|
||||
excludeFields.add("textfield1");
|
||||
excludeFields.add("textfield2");
|
||||
|
||||
return ResourceImport.getImportFields(user, excludeFields);
|
||||
case "joblevel":
|
||||
extendType = "0";
|
||||
|
|
@ -751,7 +750,6 @@ public class ImportCommonServiceImpl extends Service implements ImportCommonServ
|
|||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 生成导入模板文件
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -222,10 +222,10 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
// 禁用标记
|
||||
List<SearchConditionOption> selectOptions = new ArrayList<>();
|
||||
SearchConditionOption enableOption = new SearchConditionOption("true", "启用");
|
||||
SearchConditionOption disableOption = new SearchConditionOption("false", "禁用");
|
||||
SearchConditionOption disableOption = new SearchConditionOption("false", "封存");
|
||||
selectOptions.add(enableOption);
|
||||
selectOptions.add(disableOption);
|
||||
SearchConditionItem forbiddenTagItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "禁用标记", "forbiddenTag");
|
||||
SearchConditionItem forbiddenTagItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "封存", "forbiddenTag");
|
||||
|
||||
conditionItems.add(jobNoItem);
|
||||
conditionItems.add(jobTitleNameItem);
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
|||
ManagerDetachPO managerDetachPO = ManagerDetachPO.builder()
|
||||
.managerType(0)
|
||||
.ecManager(param.getEcManager())
|
||||
.jclManager(getResourceMapper().getJclResourceId(String.valueOf(param.getEcManager())).intValue())
|
||||
.ecRolelevel(param.getEcRolelevel())
|
||||
.manageModule("组织管理")
|
||||
.creator((long)user.getUID())
|
||||
|
|
@ -139,7 +138,6 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
|||
ManagerDetachPO managerDetachPO = ManagerDetachPO.builder()
|
||||
.id(param.getId())
|
||||
.ecManager(param.getEcManager())
|
||||
.jclManager(getResourceMapper().getJclResourceId(String.valueOf(param.getEcManager())).intValue())
|
||||
.ecRolelevel(param.getEcRolelevel())
|
||||
.build();
|
||||
return getMangeDetachMapper().updateDetach(managerDetachPO);
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ import com.engine.hrm.util.HrmWeakPasswordUtil;
|
|||
import com.engine.hrm.util.face.HrmFaceCheckManager;
|
||||
import com.engine.hrm.util.face.ValidateFieldManager;
|
||||
import com.engine.hrm.util.face.bean.CheckItemBean;
|
||||
import com.engine.organization.mapper.resource.ResourceMapper;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import com.weaver.general.BaseBean;
|
||||
import ln.LN;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -1059,14 +1057,10 @@ public class ResourceSyncUtil {
|
|||
// 先查询原有EC人员信息,再封装传参
|
||||
Map<String, Object> convertParams = new HashMap<>();
|
||||
String jclResourceId = Util.null2String(params.get("id"));
|
||||
String ecResourceId = "";
|
||||
if(StringUtils.isNotBlank(jclResourceId)){
|
||||
ecResourceId = MapperProxyFactory.getProxy(ResourceMapper.class).getEcResourceId(jclResourceId);
|
||||
}
|
||||
// 更新人员时,初始化人员参数
|
||||
if (StringUtils.isNotBlank(ecResourceId)) {
|
||||
if (StringUtils.isNotBlank(jclResourceId)) {
|
||||
RecordSet rs = new RecordSet();
|
||||
rs.execute("select * from hrmresource where id = '" + ecResourceId + "'");
|
||||
rs.execute("select * from hrmresource where id = '" + jclResourceId + "'");
|
||||
int colcount = rs.getColCounts();
|
||||
if (rs.next()) {
|
||||
for (int i = 1; i <= colcount; i++) {
|
||||
|
|
|
|||
|
|
@ -110,6 +110,9 @@ public class CompanyImport {
|
|||
lsPromptLabel.add(34275);
|
||||
lsPromptLabel.add(125452);
|
||||
lsPromptLabel.add(125466);
|
||||
lsPromptLabel.add(522356);
|
||||
lsPromptLabel.add(522357);
|
||||
lsPromptLabel.add(530411);
|
||||
|
||||
for (int i = 0; i < lsPromptLabel.size(); i++) {
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -112,6 +112,9 @@ public class DepartmentImport {
|
|||
lsPromptLabel.add(34275);
|
||||
lsPromptLabel.add(125452);
|
||||
lsPromptLabel.add(125466);
|
||||
lsPromptLabel.add(522356);
|
||||
lsPromptLabel.add(522357);
|
||||
lsPromptLabel.add(530411);
|
||||
|
||||
for (int i = 0; i < lsPromptLabel.size(); i++) {
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import com.engine.organization.entity.jclimport.po.HrmFormFieldPO;
|
|||
import com.engine.organization.entity.jclimport.po.JclImportHistoryDetailPO;
|
||||
import com.engine.organization.entity.personnelcard.po.CusTreeFormPO;
|
||||
import com.engine.organization.exception.OrganizationRunTimeException;
|
||||
import com.engine.organization.mapper.jclimport.ImportMapper;
|
||||
import com.engine.organization.mapper.jclimport.JclImportHistoryDetailMapper;
|
||||
import com.engine.organization.mapper.personnelcard.PersonnelCardMapper;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
|
|
@ -37,10 +36,6 @@ import java.util.stream.Collectors;
|
|||
*/
|
||||
public class ResourceImport {
|
||||
|
||||
private static ImportMapper getImportMapper() {
|
||||
return MapperProxyFactory.getProxy(ImportMapper.class);
|
||||
}
|
||||
|
||||
private static PersonnelCardMapper getPersonnelCardMapper() {
|
||||
return MapperProxyFactory.getProxy(PersonnelCardMapper.class);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue