@ -63,8 +63,8 @@ import java.util.Map;
* @version : 1.0
* /
public class ResourceSyncUtil {
private static final char separator = Util . getSeparator ( ) ;
private static final String today = DateUtil . getCurrentDate ( ) ;
private static final char SEPARATOR = Util . getSeparator ( ) ;
private static final String TODAY = DateUtil . getCurrentDate ( ) ;
public static Map < String , Object > addResource ( User user , Map < String , Object > params ) {
@ -411,11 +411,11 @@ public class ResourceSyncUtil {
}
}
workcode = CodeRuleManager . getCodeRuleManager ( ) . generateRuleCode ( RuleCodeType . USER , subcmpanyid1 , departmentid , jobtitle , workcode ) ;
para = new StringBuilder ( "" + id + separator + workcode + separator + lastname + separator + sex + separator + resourceimageid + separator +
departmentid + separator + costcenterid + separator + jobtitle + separator + joblevel + separator + jobactivitydesc + separator +
managerid + separator + assistantid + separator + status + separator + locationid + separator + workroom + separator + telephone +
separator + mobile + separator + mobilecall + separator + fax + separator + jobcall + separator + subcmpanyid1 + separator + managerstr +
separator + accounttype + separator + belongto + separator + systemlanguage + separator + email + separator + dsporder + separator + mobileshowtype ) ;
para = new StringBuilder ( "" + id + SEPARATOR + workcode + SEPARATOR + lastname + SEPARATOR + sex + SEPARATOR + resourceimageid + SEPARATOR +
departmentid + SEPARATOR + costcenterid + SEPARATOR + jobtitle + SEPARATOR + joblevel + SEPARATOR + jobactivitydesc + SEPARATOR +
managerid + SEPARATOR + assistantid + SEPARATOR + status + SEPARATOR + locationid + SEPARATOR + workroom + SEPARATOR + telephone +
SEPARATOR + mobile + SEPARATOR + mobilecall + SEPARATOR + fax + SEPARATOR + jobcall + SEPARATOR + subcmpanyid1 + SEPARATOR + managerstr +
SEPARATOR + accounttype + SEPARATOR + belongto + SEPARATOR + systemlanguage + SEPARATOR + email + SEPARATOR + dsporder + SEPARATOR + mobileshowtype ) ;
rst . executeProc ( "HrmResourceBasicInfo_Insert" , para . toString ( ) ) ;
if ( Util . null2String ( locationid ) . length ( ) > 0 ) {
@ -446,7 +446,7 @@ public class ResourceSyncUtil {
}
}
int userid = user . getUID ( ) ;
String userpara = "" + userid + separator + today ;
String userpara = "" + userid + SEPARATOR + TODAY ;
para = new StringBuilder ( "" + id ) ;
for ( int i = 0 ; i < 5 ; i + + ) {
int idx = i ;
@ -457,10 +457,10 @@ public class ResourceSyncUtil {
String numberfield = "" + Util . getDoubleValue ( Util . null2String ( params . get ( "numberfield" + idx ) ) , 0 ) ;
String textfield = Util . null2String ( params . get ( "textfield" + idx ) ) ;
String tinyintfield = "" + Util . getIntValue ( Util . null2String ( params . get ( "tinyintfield" + idx ) ) , 0 ) ;
para . append ( separator ) . append ( datefield ) . append ( separator ) . append ( numberfield ) . append ( separator ) . append ( textfield ) . append ( separator ) . append ( tinyintfield ) ;
para . append ( SEPARATOR ) . append ( datefield ) . append ( SEPARATOR ) . append ( numberfield ) . append ( SEPARATOR ) . append ( textfield ) . append ( SEPARATOR ) . append ( tinyintfield ) ;
}
rs . executeProc ( "HrmResourceDefine_Update" , para . toString ( ) ) ;
rs . executeProc ( "HrmResource_CreateInfo" , "" + id + separator + userpara + separator + userpara ) ;
rs . executeProc ( "HrmResource_CreateInfo" , "" + id + SEPARATOR + userpara + SEPARATOR + userpara ) ;
//421944 用户自定义隐私设置
@ -492,7 +492,7 @@ public class ResourceSyncUtil {
ResourceComInfo . addResourceInfoCache ( id ) ;
SalaryManager . initResourceSalary ( id ) ;
para = new StringBuilder ( "" + id + separator + managerid + separator + departmentid + separator + subcmpanyid1 + separator + "0" + separator + managerstr ) ;
para = new StringBuilder ( "" + id + SEPARATOR + managerid + SEPARATOR + departmentid + SEPARATOR + subcmpanyid1 + SEPARATOR + "0" + SEPARATOR + managerstr ) ;
rs . executeProc ( "HrmResource_Trigger_Insert" , para . toString ( ) ) ;
String sql_1 = ( "insert into HrmInfoStatus (itemid,hrmid) values(1," + id + ")" ) ;
@ -532,7 +532,7 @@ public class ResourceSyncUtil {
SWFTitle = SystemEnv . getHtmlLabelName ( 15670 , user . getLanguage ( ) ) ;
SWFTitle + = ":" + lastname ;
SWFTitle + = "-" + CurrentUserName ;
SWFTitle + = "-" + today ;
SWFTitle + = "-" + TODAY ;
SWFRemark = "<a class='wea-hrm-new-employee-set' onClick=\"openHrmNewEmployeeSetDialog(" + id + ")\" style=\"cursor:pointer;\" id = '" + id + "'>" + Util . fromScreen2 ( Subject , user . getLanguage ( ) ) + "</a>" ;
SWFSubmiter = CurrentUser ;
SysRemindWorkflow . setPrjSysRemind ( SWFTitle , 0 , Util . getIntValue ( SWFSubmiter ) , SWFAccepter , SWFRemark ) ;
@ -575,7 +575,7 @@ public class ResourceSyncUtil {
String homeaddress = Util . null2String ( rs . getString ( "homeaddress" ) ) ;
String tempresidentnumber = Util . null2String ( rs . getString ( "tempresidentnumber" ) ) ;
para = new StringBuilder ( "" + id + separator + birthday + separator + folk + separator + nativeplace + separator + regresidentplace + separator + maritalstatus + separator + policy + separator + bememberdate + separator + bepartydate + separator + islabouunion + separator + educationlevel + separator + degree + separator + healthinfo + separator + height + separator + weight + separator + residentplace + separator + homeaddress + separator + tempresidentnumber + separator + certificatenum ) ;
para = new StringBuilder ( "" + id + SEPARATOR + birthday + SEPARATOR + folk + SEPARATOR + nativeplace + SEPARATOR + regresidentplace + SEPARATOR + maritalstatus + SEPARATOR + policy + SEPARATOR + bememberdate + SEPARATOR + bepartydate + SEPARATOR + islabouunion + SEPARATOR + educationlevel + SEPARATOR + degree + SEPARATOR + healthinfo + SEPARATOR + height + SEPARATOR + weight + SEPARATOR + residentplace + SEPARATOR + homeaddress + SEPARATOR + tempresidentnumber + SEPARATOR + certificatenum ) ;
RecordSet rs1 = new RecordSet ( ) ;
rs1 . executeProc ( "HrmResourcePersonalInfo_Insert" , para . toString ( ) ) ;
}
@ -810,12 +810,12 @@ public class ResourceSyncUtil {
if ( StringUtils . isNotEmpty ( workcode ) ) {
CodeRuleManager . getCodeRuleManager ( ) . checkReservedIfDel ( RuleCodeType . USER . getValue ( ) , workcode ) ;
}
para = new StringBuilder ( "" + id + separator + workcode + separator + lastname + separator + sex + separator + resourceimageid
+ separator + departmentid + separator + costcenterid + separator + jobtitle + separator + joblevel
+ separator + jobactivitydesc + separator + managerid + separator + assistantid + separator + status
+ separator + locationid + separator + workroom + separator + telephone + separator + mobile
+ separator + mobilecall + separator + fax + separator + jobcall + separator + systemlanguage
+ separator + accounttype + separator + belongto + separator + email + separator + dsporder + separator + mobileshowtype ) ;
para = new StringBuilder ( "" + id + SEPARATOR + workcode + SEPARATOR + lastname + SEPARATOR + sex + SEPARATOR + resourceimageid
+ SEPARATOR + departmentid + SEPARATOR + costcenterid + SEPARATOR + jobtitle + SEPARATOR + joblevel
+ SEPARATOR + jobactivitydesc + SEPARATOR + managerid + SEPARATOR + assistantid + SEPARATOR + status
+ SEPARATOR + locationid + SEPARATOR + workroom + SEPARATOR + telephone + SEPARATOR + mobile
+ SEPARATOR + mobilecall + SEPARATOR + fax + SEPARATOR + jobcall + SEPARATOR + systemlanguage
+ SEPARATOR + accounttype + SEPARATOR + belongto + SEPARATOR + email + SEPARATOR + dsporder + SEPARATOR + mobileshowtype ) ;
RecordSetTrans rst = new RecordSetTrans ( ) ;
rst . setAutoCommit ( false ) ;
try {
@ -867,8 +867,8 @@ public class ResourceSyncUtil {
}
int userid = user . getUID ( ) ;
String userpara = "" + userid + separator + today ;
rs . executeProc ( "HrmResource_ModInfo" , "" + id + separator + userpara ) ;
String userpara = "" + userid + SEPARATOR + TODAY ;
rs . executeProc ( "HrmResource_ModInfo" , "" + id + SEPARATOR + userpara ) ;
String managerstr = "" ;
if ( ! id . equals ( managerid ) ) {
sql = "select managerstr from HrmResource where id = " + Util . getIntValue ( managerid ) ;
@ -893,7 +893,7 @@ public class ResourceSyncUtil {
rst = new RecordSetTrans ( ) ;
rst . setAutoCommit ( false ) ;
try {
para = new StringBuilder ( "" + id + separator + managerstr ) ;
para = new StringBuilder ( "" + id + SEPARATOR + managerstr ) ;
rst . executeProc ( "HrmResource_UpdateManagerStr" , para . toString ( ) ) ;
rst . commit ( ) ;
} catch ( Exception e ) {
@ -935,7 +935,7 @@ public class ResourceSyncUtil {
rst = new RecordSetTrans ( ) ;
rst . setAutoCommit ( false ) ;
try {
para = new StringBuilder ( resourceid + separator + nowmanagerstr2 ) ;
para = new StringBuilder ( resourceid + SEPARATOR + nowmanagerstr2 ) ;
rst . executeProc ( "HrmResource_UpdateManagerStr" , para . toString ( ) ) ;
rst . commit ( ) ;
ResourceComInfo . updateResourceInfoCache ( resourceid ) ; //更新缓存
@ -947,7 +947,7 @@ public class ResourceSyncUtil {
}
String subcmpanyid1 = DepartmentComInfo . getSubcompanyid1 ( departmentid ) ;
para = new StringBuilder ( "" + id + separator + subcmpanyid1 ) ;
para = new StringBuilder ( "" + id + SEPARATOR + subcmpanyid1 ) ;
rst = new RecordSetTrans ( ) ;
rst . setAutoCommit ( false ) ;
try {
@ -980,7 +980,7 @@ public class ResourceSyncUtil {
String numberfield = "" + Util . getDoubleValue ( Util . null2String ( params . get ( "numberfield" + idx ) ) , 0 ) ;
String textfield = Util . null2String ( params . get ( "textfield" + idx ) ) ;
String tinyintfield = "" + Util . getIntValue ( Util . null2String ( params . get ( "tinyintfield" + idx ) ) , 0 ) ;
para . append ( separator ) . append ( datefield ) . append ( separator ) . append ( numberfield ) . append ( separator ) . append ( textfield ) . append ( separator ) . append ( tinyintfield ) ;
para . append ( SEPARATOR ) . append ( datefield ) . append ( SEPARATOR ) . append ( numberfield ) . append ( SEPARATOR ) . append ( textfield ) . append ( SEPARATOR ) . append ( tinyintfield ) ;
}
rs . executeProc ( "HrmResourceDefine_Update" , para . toString ( ) ) ;