发票传递
This commit is contained in:
parent
103b9c2981
commit
ab0be7eb28
|
@ -8,8 +8,8 @@ import com.hzya.frame.web.entity.BaseEntity;
|
|||
*/
|
||||
public class IncomeInvoiceEntity extends BaseEntity {
|
||||
|
||||
private Integer data_id;
|
||||
private Integer formmain_id;
|
||||
private Integer dataId;
|
||||
private Integer formmainId;
|
||||
private String field0127;
|
||||
private String field0128;
|
||||
private String field0129;
|
||||
|
@ -17,20 +17,20 @@ public class IncomeInvoiceEntity extends BaseEntity {
|
|||
private String field0003;
|
||||
|
||||
|
||||
public Integer getData_id() {
|
||||
return data_id;
|
||||
public Integer getDataId() {
|
||||
return dataId;
|
||||
}
|
||||
|
||||
public void setData_id(Integer data_id) {
|
||||
this.data_id = data_id;
|
||||
public void setDataId(Integer dataId) {
|
||||
this.dataId = dataId;
|
||||
}
|
||||
|
||||
public Integer getFormmain_id() {
|
||||
return formmain_id;
|
||||
public Integer getFormmainId() {
|
||||
return formmainId;
|
||||
}
|
||||
|
||||
public void setFormmain_id(Integer formmain_id) {
|
||||
this.formmain_id = formmain_id;
|
||||
public void setFormmainId(Integer formmainId) {
|
||||
this.formmainId = formmainId;
|
||||
}
|
||||
|
||||
public String getField0127() {
|
||||
|
|
|
@ -164,7 +164,7 @@
|
|||
</insert>
|
||||
<select id="queryOaZb" resultType="com.hzya.frame.plugin.incomeInvoiceData.entity.IncomeInvoiceEntity" parameterType="com.hzya.frame.plugin.incomeInvoiceData.entity.IncomeInvoiceEntity">
|
||||
select
|
||||
id as data_id,
|
||||
id as dataId,
|
||||
field0003
|
||||
from formmain_0323
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
|
@ -174,7 +174,7 @@
|
|||
|
||||
<select id="queryOaMx" resultType="com.hzya.frame.plugin.incomeInvoiceData.entity.IncomeInvoiceEntity" parameterType="com.hzya.frame.plugin.incomeInvoiceData.entity.IncomeInvoiceEntity">
|
||||
select
|
||||
id as data_id
|
||||
id as dataId
|
||||
from formson_0702
|
||||
<trim prefix="where" prefixOverrides="and">
|
||||
<if test="field0128 != null and field0128 != ''"> and field0128 = #{field0128} </if>
|
||||
|
@ -189,14 +189,14 @@
|
|||
<if test="field0129 != null and field0129 != ''"> field0129 = #{field0129},</if>
|
||||
<if test="field0130 != null and field0130 != ''"> field0130 = #{field0130},</if>
|
||||
</trim>
|
||||
where id = #{data_id}
|
||||
where id = #{dataId}
|
||||
</update>
|
||||
|
||||
<insert id="saveMx" parameterType="com.hzya.frame.report.reportManage.entity.ReportManageEntity">
|
||||
insert into formson_0702(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="data_id != null and data_id != ''">id ,</if>
|
||||
<if test="formmain_id != null and formmain_id != ''">formmain_id ,</if>
|
||||
<if test="dataId != null and dataId != ''">id ,</if>
|
||||
<if test="formmainId != null and formmainId != ''">formmain_id ,</if>
|
||||
<if test="field0127 != null and field0127 != ''">field0127 ,</if>
|
||||
<if test="field0128 != null and field0128 != ''">field0128 ,</if>
|
||||
<if test="field0129 != null and field0129 != ''">field0129 ,</if>
|
||||
|
@ -205,8 +205,8 @@
|
|||
</trim>
|
||||
)values(
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="data_id != null and data_id != ''">#{data_id} ,</if>
|
||||
<if test="formmain_id != null and formmain_id != ''">#{formmain_id} ,</if>
|
||||
<if test="dataId != null and dataId != ''">#{dataId} ,</if>
|
||||
<if test="formmainId != null and formmainId != ''">#{formmainId} ,</if>
|
||||
<if test="field0127 != null and field0127 != ''">#{field0127} ,</if>
|
||||
<if test="field0128 != null and field0128 != ''">#{field0128} ,</if>
|
||||
<if test="field0129 != null and field0129 != ''">#{field0129} ,</if>
|
||||
|
|
|
@ -462,23 +462,24 @@ public class IncomeInvoiceServiceImpl extends BaseService<IncomeInvoiceEntity, S
|
|||
entity.setBodys(sendBody.toJSONString());
|
||||
//修改明细表
|
||||
IncomeInvoiceEntity incomeInvoiceEntity = new IncomeInvoiceEntity();
|
||||
incomeInvoiceEntity.setDataSourceCode("master");
|
||||
incomeInvoiceEntity.setField0003("hth001");//合同号
|
||||
incomeInvoiceEntity.setDataSourceCode("master");//todo
|
||||
//incomeInvoiceEntity.setDataSourceCode("HT-OA");//todo
|
||||
incomeInvoiceEntity.setField0003("hth001");//合同号 todo
|
||||
incomeInvoiceEntity.setField0127(jsonObject.getString("fpdm"));//发票代码
|
||||
incomeInvoiceEntity.setField0128(jsonObject.getString("fphm"));//发票号码
|
||||
incomeInvoiceEntity.setField0129(jsonObject.getString("jshj"));//发票总额
|
||||
incomeInvoiceEntity.setField0130(jsonObject.getString("fpwj"));//发票文件
|
||||
incomeInvoiceEntity.setField0130(jsonObject.getString("fpwj"));//发票文件 todo
|
||||
List<IncomeInvoiceEntity> list = incomeInvoiceDao.queryOaZb(incomeInvoiceEntity);
|
||||
if(list != null && list.size() == 1){
|
||||
incomeInvoiceEntity.setFormmain_id(list.get(0).getData_id());
|
||||
incomeInvoiceEntity.setFormmainId(list.get(0).getDataId());
|
||||
}
|
||||
List<IncomeInvoiceEntity> mxlist = incomeInvoiceDao.queryOaMx(incomeInvoiceEntity);
|
||||
if(mxlist != null && mxlist.size() == 1){
|
||||
incomeInvoiceEntity.setData_id(mxlist.get(0).getData_id());
|
||||
incomeInvoiceEntity.setDataId(mxlist.get(0).getDataId());
|
||||
incomeInvoiceDao.updateMx(incomeInvoiceEntity);
|
||||
}
|
||||
if(mxlist == null || mxlist.size() == 0){
|
||||
incomeInvoiceEntity.setData_id(1);
|
||||
incomeInvoiceEntity.setDataId(1);
|
||||
incomeInvoiceDao.saveMx(incomeInvoiceEntity);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
<beans default-autowire="byName">
|
||||
<bean name="incomeInvoicePluginInitializer" class="com.hzya.frame.plugin.incomeInvoiceData.plugin.IncomeInvoicePluginInitializer" />
|
||||
<bean name="IncomeInvoicePlugin_Initializer" class="com.hzya.frame.plugin.incomeInvoiceData.plugin.IncomeInvoicePluginInitializer" />
|
||||
</beans>
|
||||
|
|
Loading…
Reference in New Issue