Merge remote-tracking branch 'origin/release20211231' into release20211231

This commit is contained in:
yjf 2022-07-27 11:07:19 +08:00
commit ac5a94a26e
5 changed files with 79 additions and 0 deletions

View File

@ -808,6 +808,7 @@
<attribute name="ZC_PROJECT_NUMBER" label="中车申请号" type="STRING" length="32"/>
<attribute name="ZC_CONTRACT_NUMBER" label="中车合同号" type="STRING" length="32"/>
<attribute name="CORPUS_SOURCE" label="资方名称" type="STRING" length="10"/>
<attribute name="ap_contract_status" label="合同状态" type="STRING" length="30"/>
</attributes>
<manager>
<managerProperties>
@ -1080,6 +1081,7 @@
<attribute name="ZC_PROJECT_NUMBER" label="中车申请号" type="STRING" length="32"/>
<attribute name="ZC_CONTRACT_NUMBER" label="中车合同号" type="STRING" length="32"/>
<attribute name="CORPUS_SOURCE" label="资方名称" type="STRING" length="10"/>
<attribute name="ap_contract_status" label="合同状态" type="STRING" length="30"/>
</attributes>
<manager>
<managerProperties>
@ -2829,6 +2831,7 @@
<attribute name="ZC_PROJECT_NUMBER" label="中车申请号" type="STRING" length="32"/>
<attribute name="ZC_CONTRACT_NUMBER" label="中车合同号" type="STRING" length="32"/>
<attribute name="CORPUS_SOURCE" label="资方名称" type="STRING" length="10"/>
<attribute name="ap_contract_status" label="合同状态" type="STRING" length="30"/>
</attributes>
<manager>
<managerProperties>

View File

@ -345,4 +345,8 @@ public interface LB_CONTRACT_INFO{
* 资方名称 STRING(10)<br>
*/
public static final String CORPUS_SOURCE = "CORPUS_SOURCE";
/**
* ºÏͬ״̬ STRING(30)<br>
*/
public static final String ap_contract_status = "ap_contract_status";
}

View File

@ -333,4 +333,8 @@ public interface LB_CONTRACT_INFO_HIS{
* 资方名称 STRING(10)<br>
*/
public static final String CORPUS_SOURCE = "CORPUS_SOURCE";
/**
* ºÏͬ״̬ STRING(30)<br>
*/
public static final String ap_contract_status = "ap_contract_status";
}

View File

@ -337,4 +337,8 @@ public interface LB_CONTRACT_INFO_TEMP{
* 资方名称 STRING(10)<br>
*/
public static final String CORPUS_SOURCE = "CORPUS_SOURCE";
/**
* ºÏͬ״̬ STRING(30)<br>
*/
public static final String ap_contract_status = "ap_contract_status";
}

View File

@ -0,0 +1,64 @@
package quartz;
import java.util.List;
import java.util.Map;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.util.StringFunction;
import com.amarsoft.awe.util.SqlObject;
import com.amarsoft.awe.util.Transaction;
import com.base.util.QuartzUtil;
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
import com.tenwa.lease.app.quartzmession.JobInitUserName;
public class ObtainUpdataContractStatus implements Job{
private JobInitUserName jboName;
@Override
public void execute(JobExecutionContext arg0) throws JobExecutionException {
String startime = StringFunction.getTodayNow();
Object userId = arg0.getTrigger().getJobDataMap().get("CurUserId");
String curUserId = userId == null? "system" : userId.toString();
Transaction sqlca = null ;
try {
sqlca = Transaction.createTransaction("als");
sqlca.getConnection().setAutoCommit(true);
/*String sql = "update lb_contract_info lci set lci.ap_contract_status="+
" (SELECT cl.itemname FROM " +
" ( SELECT contract_number, MAX( inputtime ) AS inputtime, business_status FROM business_status WHERE contract_number LIKE 'BQAP(%' GROUP BY contract_number ) bs " +
" LEFT JOIN business_status cs ON bs.contract_number = cs.contract_number " +
" AND bs.inputtime = cs.inputtime " +
" LEFT JOIN ( SELECT itemno, itemname FROM code_library WHERE codeno = 'BusinessStatus' ) cl ON cs.business_status = cl.itemno " +
" where bs.contract_number=lci.CONTRACT_NO) " +
" where ((ap_contract_status<>'攣끽써헌' and ap_contract_status<>'瓊품써헌') or ap_contract_status is null) ";
List<Map<String,String>> list = DataOperatorUtil.getDataBySql("select ID,CONTRACT_NO from lb_contract_info where BUSINESSTYPE ='1' and ((ap_contract_status<>'攣끽써헌' and ap_contract_status<>'瓊품써헌') or ap_contract_status is null) ");
String contractStatus = null ;
if(list!=null && list.size()>0) {
System.out.println("gengxindeshuju="+list.size());
for (Map<String, String> map : list) {
contractStatus = sqlca.getString("select getAPBusinessStatus('"+map.get("CONTRACT_NO")+"') from dual");
sqlca.executeSQL(new SqlObject("update lb_contract_info set ap_contract_status = '"+contractStatus+"' where id='"+map.get("ID")+"'"));
sqlca.commit();
}
}*/
sqlca.executeSQL(new SqlObject("call proc_update_contract_status() "));
QuartzUtil.insertLog(startime, "quartz.ObtainUpdataContractStatus", "success", "냥묘", curUserId);
} catch (Exception e) {
QuartzUtil.insertLog(startime, "quartz.ObtainUpdataContractStatus", "error", "呵겨", curUserId);
e.printStackTrace();
}finally{
try {
if(sqlca !=null){
sqlca.disConnect();
}
} catch (JBOException e) {
e.printStackTrace();
}
}
}
}