|
|
@@ -23,8 +23,6 @@ public class UasOaService extends AbstractService {
|
|
|
private final Logger logger = LoggerFactory.getLogger(UasOaService.class);
|
|
|
@Autowired
|
|
|
private OaSdk oaSdk;
|
|
|
- @Autowired
|
|
|
- protected JdbcTemplate jdbcTemplate;
|
|
|
|
|
|
public void saveOa(String agentCode,int id){
|
|
|
logger.info("agentCode=="+agentCode);
|
|
|
@@ -52,7 +50,6 @@ public class UasOaService extends AbstractService {
|
|
|
*/
|
|
|
public void saveAlitripList(String agentCode, String startTime, String endTime) {
|
|
|
List<OapiAlitripBtripApplySearchResponse.OpenApplyRs> alitripList = oaSdk.getAllAlitrip(agentCode,startTime,endTime);
|
|
|
- logger.info("alitripList=="+alitripList);
|
|
|
if (!CollectionUtils.isEmpty(alitripList)) {
|
|
|
for (OapiAlitripBtripApplySearchResponse.OpenApplyRs openApplyRs:alitripList) {
|
|
|
String inDate = DateUtil.format(openApplyRs.getGmtCreate(),"yyyy-MM-dd HH:mm:ss");
|
|
|
@@ -63,17 +60,15 @@ public class UasOaService extends AbstractService {
|
|
|
Long rsId = openApplyRs.getId();
|
|
|
String projectTitle = openItineraryInfo.getProjectTitle();
|
|
|
String projectCode = openItineraryInfo.getProjectCode();
|
|
|
+ String arrCity = openItineraryInfo.getArrCity();
|
|
|
+ String depCity = openItineraryInfo.getDepCity();
|
|
|
String statusDesc = openApplyRs.getStatusDesc()==null?"":openApplyRs.getStatusDesc();
|
|
|
int count =queryForObject("select count(1) from FeePlease where dp_ddid=" + rsId, Integer.class);
|
|
|
- logger.info("saveAlitripList-count=="+count);
|
|
|
- logger.info("saveAlitripList-statusDesc=="+statusDesc);
|
|
|
if (count<=0&&"已同意".equals(statusDesc)) {
|
|
|
int id = generateId("FEEPLEASE_SEQ");
|
|
|
String code = generateCode("FeePlease!CCSQ!new", 2);
|
|
|
- logger.info("saveAlitripList-id=="+id);
|
|
|
- logger.info("saveAlitripList-code=="+code);
|
|
|
- jdbcTemplate.execute("insert into FeePlease (fp_id,fp_code,fp_kind,fp_v9,FP_PEOPLE2,fp_recordman,fp_recorddate,fp_statuscode,fp_status,fp_v3,fp_prestartdate,fp_preenddate,fp_n6,dp_ddid,fp_remark,fp_prjcode,fp_prjname) " +
|
|
|
- "values (" + id + ",'" + code + "','出差申请单','" + openApplyRs.getDeptName() + "','" + openApplyRs.getUserName() + "','" + openApplyRs.getUserName() + "',to_date('" + inDate + "','yyyy-MM-dd HH24:mi:ss'),'AUDITED','已审核','" + openApplyRs.getTripCause() + "',to_date('" + startDate + "','yyyy-MM-dd HH24:mi:ss'),to_date('" + endDate + "','yyyy-MM-dd HH24:mi:ss')," + openApplyRs.getTripDay() + ","+rsId+",'"+statusDesc+"','"+projectCode+"','"+projectTitle+"')");
|
|
|
+ jdbcTemplate.execute("insert into FeePlease (fp_id,fp_code,fp_kind,fp_v9,FP_PEOPLE2,fp_recordman,fp_recorddate,fp_statuscode,fp_status,fp_v3,fp_prestartdate,fp_preenddate,fp_n6,dp_ddid,fp_remark,fp_prjcode,fp_prjname,fp_depcity,fp_arrcity) " +
|
|
|
+ "values (" + id + ",'" + code + "','出差申请单','" + openApplyRs.getDeptName() + "','" + openApplyRs.getUserName() + "','" + openApplyRs.getUserName() + "',to_date('" + inDate + "','yyyy-MM-dd HH24:mi:ss'),'AUDITED','已审核','" + openApplyRs.getTripCause() + "',to_date('" + startDate + "','yyyy-MM-dd HH24:mi:ss'),to_date('" + endDate + "','yyyy-MM-dd HH24:mi:ss')," + openApplyRs.getTripDay() + ","+rsId+",'"+statusDesc+"','"+projectCode+"','"+projectTitle+"','"+depCity+"','"+arrCity+"')");
|
|
|
/*jdbcTemplate.execute("insert into FeePleaseDetail(fpd_id,fpd_fpid,fpd_code,fpd_class,fpd_detno,fpd_d5,fpd_d6,fpd_date1,fpd_date2) " +
|
|
|
"values(FeePleaseDetail_seq.nextval,"+id+",'"+code+"','出差申请单',1,'"+projectCode+"','"+projectTitle+"',to_date('" + startDate + "','yyyy-MM-dd HH24:mi:ss'),to_date('" + endDate + "','yyyy-MM-dd HH24:mi:ss'))");*/
|
|
|
}
|
|
|
@@ -110,7 +105,7 @@ public class UasOaService extends AbstractService {
|
|
|
* 请假申请
|
|
|
*/
|
|
|
public void saveLeaves(String agentCode, long startTime, long endTime){
|
|
|
- int count = queryForObject("select count(1) from employee where nvl(em_class,' ')<>'离职' and nvl(em_ding,' ')<>' '",Integer.class);
|
|
|
+ int count = queryForObject("select count(1) from employee where nvl(em_ding,' ')<>' '",Integer.class);
|
|
|
if (count>0){
|
|
|
int size=100;
|
|
|
for (int i = 0; i < count/size; i++) {
|