更新付款银行卡号到明细行字段
This commit is contained in:
parent
f894e0c754
commit
7f1902fc33
|
@ -32,5 +32,9 @@ public interface IPayBillPluginInitializerDao extends IBaseDao<PayBillEntity, St
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int updateStateForId(String str , PayBillEntity entity)throws Exception;
|
int updateStateForId(String str , PayBillEntity entity)throws Exception;
|
||||||
|
|
||||||
|
List<PayBillEntity> queryyhzh(PayBillEntity yhzhid) throws Exception;
|
||||||
|
|
||||||
|
int updateYhzh(PayBillEntity updateyhzh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,5 +29,17 @@ public class PayBillPluginInitializerDaoImpl extends MybatisGenericDao<PayBillEn
|
||||||
public int updateStateForId(String str , PayBillEntity entity)throws Exception {
|
public int updateStateForId(String str , PayBillEntity entity)throws Exception {
|
||||||
return super.update("com.hzya.frame.plugin.a8bill.dao.impl.PayBillPluginInitializerDaoImpl.PayBillEntity_update",entity);
|
return super.update("com.hzya.frame.plugin.a8bill.dao.impl.PayBillPluginInitializerDaoImpl.PayBillEntity_update",entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public List<PayBillEntity> queryyhzh(PayBillEntity entity)throws Exception {
|
||||||
|
return super.query(getSqlIdPrifx() + "queryyhzh",entity);
|
||||||
|
}
|
||||||
|
@DS("#entity.dataSourceCode")
|
||||||
|
@Override
|
||||||
|
public int updateYhzh(PayBillEntity entity) {
|
||||||
|
return super.update(getSqlIdPrifx() + "updateYhzh",entity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,10 @@ import com.hzya.frame.web.entity.BaseEntity;
|
||||||
*/
|
*/
|
||||||
public class PayBillEntity extends BaseEntity {
|
public class PayBillEntity extends BaseEntity {
|
||||||
private String sql;
|
private String sql;
|
||||||
|
private String yhzh;//银行账号
|
||||||
|
private String bankaccbas;//账号id
|
||||||
|
private String accountname;//账号名称
|
||||||
|
private String billCode;//单据号
|
||||||
|
|
||||||
public String getSql() {
|
public String getSql() {
|
||||||
return sql;
|
return sql;
|
||||||
|
@ -18,5 +22,37 @@ public class PayBillEntity extends BaseEntity {
|
||||||
public void setSql(String sql) {
|
public void setSql(String sql) {
|
||||||
this.sql = sql;
|
this.sql = sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getYhzh() {
|
||||||
|
return yhzh;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setYhzh(String yhzh) {
|
||||||
|
this.yhzh = yhzh;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBankaccbas() {
|
||||||
|
return bankaccbas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBankaccbas(String bankaccbas) {
|
||||||
|
this.bankaccbas = bankaccbas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAccountname() {
|
||||||
|
return accountname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccountname(String accountname) {
|
||||||
|
this.accountname = accountname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBillCode() {
|
||||||
|
return billCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBillCode(String billCode) {
|
||||||
|
this.billCode = billCode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,5 +17,14 @@
|
||||||
${sql}
|
${sql}
|
||||||
</if>
|
</if>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="queryyhzh" parameterType="com.hzya.frame.plugin.a8bill.entity.PayBillEntity"
|
||||||
|
resultType="com.hzya.frame.plugin.a8bill.entity.PayBillEntity" >
|
||||||
|
select bankaccbas,accountname from bd_bankaccbas where account = #{yhzh}
|
||||||
|
</select>
|
||||||
|
<update id="entity_update" parameterType="com.hzya.frame.plugin.a8bill.entity.PayBillEntity">
|
||||||
|
update ARAP_DJFB set bfyhzh = #{bankaccbas},skyhmc = #{accountname}
|
||||||
|
where djbh = #{billCode}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
|
@ -392,12 +392,36 @@ private IFormmain0044Service formmain0044Service;
|
||||||
String dwbm = main.getString("dwbm");
|
String dwbm = main.getString("dwbm");
|
||||||
String state = main.getString("state");
|
String state = main.getString("state");
|
||||||
String userCode = main.getString("userCode");
|
String userCode = main.getString("userCode");
|
||||||
|
|
||||||
|
|
||||||
|
String yhzh = main.getString("yhzh");//银行账号
|
||||||
|
String u8cCode = main.getString("u8cCode");//数据源编码
|
||||||
|
|
||||||
String id = main.getString("id");
|
String id = main.getString("id");
|
||||||
if (StrUtil.isNotEmpty(billCode)){
|
if (StrUtil.isNotEmpty(billCode)){
|
||||||
PayBillEntity oaBillEntity = new PayBillEntity();
|
PayBillEntity oaBillEntity = new PayBillEntity();
|
||||||
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
oaBillEntity.setDataSourceCode(oa_data_source_code);
|
||||||
String str = "update formmain_0058 set field0072 = 'N' where id = "+id;
|
String str = "update formmain_0058 set field0072 = 'N' where id = "+id;
|
||||||
try {
|
try {
|
||||||
|
//刷新数据
|
||||||
|
//查询银行账号表的ID
|
||||||
|
if(u8cCode != null && !"".equals(u8cCode) && yhzh != null && !"".equals(yhzh)){
|
||||||
|
logger.info("执行U8C付款单审批接口修改账号,u8c数据源编码:"+u8cCode+",银行账号:"+yhzh);
|
||||||
|
PayBillEntity yhzhid = new PayBillEntity();
|
||||||
|
yhzhid.setDataSourceCode(u8cCode);
|
||||||
|
yhzhid.setYhzh(yhzh);
|
||||||
|
List<PayBillEntity> yhzhList = payBillDao.queryyhzh(yhzhid);
|
||||||
|
//修改数据
|
||||||
|
if(yhzhList != null && yhzhList.size() == 1){
|
||||||
|
PayBillEntity updateyhzh = yhzhList.get(0);
|
||||||
|
logger.info("执行U8C付款单审批接口修改账号,查询到账号,修改数据。银行账号:"+yhzh+"。账号id:"+updateyhzh.getBankaccbas()+",账号名称:"+updateyhzh.getAccountname()+",单据号:"+billCode);
|
||||||
|
updateyhzh.setDataSourceCode(u8cCode);
|
||||||
|
updateyhzh.setBillCode(billCode);
|
||||||
|
payBillDao.updateYhzh(updateyhzh);
|
||||||
|
}else {
|
||||||
|
logger.info("执行U8C付款单审批接口修改账号,未查询到账号");
|
||||||
|
}
|
||||||
|
}
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("billno",billCode);
|
param.put("billno",billCode);
|
||||||
param.put("corpcode",dwbm);
|
param.put("corpcode",dwbm);
|
||||||
|
|
Loading…
Reference in New Issue