Merge branch 'ht' of http://ufidahz.com.cn:9015/hzya/kangarooDataCenterV3 into ht
This commit is contained in:
commit
48c98f452b
|
@ -69,4 +69,14 @@ public interface IInvoiceDao extends IBaseDao<InvoiceEntity,String> {
|
|||
* @Date 2025-04-17 15:19
|
||||
* **/
|
||||
List<InvoiceEntity> queryInputInvoiceResult(InvoiceEntity entity);
|
||||
|
||||
/**
|
||||
*
|
||||
* @content 更新发票批量录入结果
|
||||
* @Param
|
||||
* @Return
|
||||
* @Author hecan
|
||||
* @Date 2025-05-26 10:34
|
||||
* **/
|
||||
Integer updateInputInvoiceResult(InvoiceEntity entity);
|
||||
}
|
||||
|
|
|
@ -62,4 +62,10 @@ public class InvoiceDaoImpl extends MybatisGenericDao<InvoiceEntity,String> impl
|
|||
public List<InvoiceEntity> queryInputInvoiceResult(InvoiceEntity entity) {
|
||||
return (List<InvoiceEntity>)super.selectList("queryInputInvoiceResult",entity);
|
||||
}
|
||||
|
||||
@DS("#entity.dataSourceCode")
|
||||
@Override
|
||||
public Integer updateInputInvoiceResult(InvoiceEntity entity) {
|
||||
return super.update("updateInputInvoiceResult",entity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,6 +75,52 @@ public class InvoiceEntity extends BaseEntity {
|
|||
private String summaryId;//
|
||||
private String input_result_status_filed;//进项发票结果字段
|
||||
private String input_result_status;//进项发票结果
|
||||
private String yd_result;//进项发票批量导入返回流水号
|
||||
private String tab_name;//表名称
|
||||
private String yd_res_field;//进项发票批量导入返回流水号字段
|
||||
private String import_result_field;//进项发票批量导入返回结果字段
|
||||
private String import_result;//进项发票批量导入返回结果
|
||||
|
||||
|
||||
public String getTab_name() {
|
||||
return tab_name;
|
||||
}
|
||||
|
||||
public void setTab_name(String tab_name) {
|
||||
this.tab_name = tab_name;
|
||||
}
|
||||
|
||||
public String getYd_res_field() {
|
||||
return yd_res_field;
|
||||
}
|
||||
|
||||
public void setYd_res_field(String yd_res_field) {
|
||||
this.yd_res_field = yd_res_field;
|
||||
}
|
||||
|
||||
public String getImport_result_field() {
|
||||
return import_result_field;
|
||||
}
|
||||
|
||||
public void setImport_result_field(String import_result_field) {
|
||||
this.import_result_field = import_result_field;
|
||||
}
|
||||
|
||||
public String getImport_result() {
|
||||
return import_result;
|
||||
}
|
||||
|
||||
public void setImport_result(String import_result) {
|
||||
this.import_result = import_result;
|
||||
}
|
||||
|
||||
public String getYd_result() {
|
||||
return yd_result;
|
||||
}
|
||||
|
||||
public void setYd_result(String yd_result) {
|
||||
this.yd_result = yd_result;
|
||||
}
|
||||
|
||||
public String getInput_result_status_filed() {
|
||||
return input_result_status_filed;
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<select id="queryInputInvoiceResult" resultMap="get-InvoiceEntity-result" parameterType="com.hzya.frame.seeyon.invoice.entity.InvoiceEntity">
|
||||
select
|
||||
*
|
||||
from formmain_0533
|
||||
from v_hzya_invoice_import where push_status is not null and yd_result is not null
|
||||
</select>
|
||||
|
||||
<!--通过主键修改方法-->
|
||||
|
@ -115,6 +115,11 @@
|
|||
where id=#{id}
|
||||
</update>
|
||||
|
||||
<!--通过主键修改方法-->
|
||||
<update id="updateInputInvoiceResult" parameterType = "com.hzya.frame.seeyon.invoice.entity.InvoiceEntity" >
|
||||
update ${tab_name} set ${import_result_field} =#{import_result} where id=#{id}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
for (InvoiceEntity entity : invoiceEntities) {
|
||||
entity.setDataSourceCode("HT-OA");
|
||||
JSONObject jsonObject=new JSONObject();
|
||||
jsonObject.put("serialNumber",entity.getId());
|
||||
jsonObject.put("serialNumber",entity.getYd_result());
|
||||
//发送数据
|
||||
String result = HttpRequest.post(url).
|
||||
header("appId", "800060").
|
||||
|
@ -280,7 +280,7 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
logger.info("=====调用杭泰税务查询发票批量录入结果的返回参数为:{}===========",result);
|
||||
JSONObject resultJson = JSONObject.parseObject(result);
|
||||
if (!resultJson.getBoolean("flag")) {
|
||||
saveTaskLivingDetails(entity.getId(), entity.getBusiness_no(), jsonObject.toJSONString(), resultJson.toJSONString(), false,"");
|
||||
saveTaskLivingDetails(entity.getSerial_number(), entity.getBusiness_no(), jsonObject.toJSONString(), resultJson.toJSONString(), false,"");
|
||||
} else {
|
||||
JSONObject attribute = resultJson.getJSONObject("attribute");
|
||||
if("0".equals(attribute.getString("code"))) {
|
||||
|
@ -288,12 +288,12 @@ public class InvoiceServiceImpl extends BaseService<InvoiceEntity, String> imple
|
|||
if (null != jsonResult) {
|
||||
String serialNumber = jsonResult.getString("serialNumber");//流水号
|
||||
String status = jsonResult.getString("status");//发票批量录入返回结果状态
|
||||
if(serialNumber.equals(entity.getId())){
|
||||
if(serialNumber.equals(entity.getYd_result())){
|
||||
//修改发票批量录入结果状态
|
||||
logger.info("=========开始更新进项发票的结果==========");
|
||||
entity.setInput_result_status(InvoiceState.invoiceStateGetValue(status));
|
||||
entity.setImport_result(InvoiceState.invoiceStateGetValue(status));
|
||||
entity.setDataSourceCode("HT-OA");
|
||||
invoiceDao.updateInvoiceResult(entity);
|
||||
invoiceDao.updateInputInvoiceResult(entity);
|
||||
logger.info("=========更新进项发票的结果完成==========");
|
||||
saveTaskLivingDetails(entity.getId(),entity.getBusiness_no(),jsonObject.toJSONString(), resultJson.toJSONString(), true,"");
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
|
||||
<!--通过主键修改方法-->
|
||||
<update id="updateElecStatusZX" parameterType = "com.hzya.frame.seeyon.zxbank.entity.ZxBankEntity" >
|
||||
update ${tabName} set ${receiptFiled} =#{receipt} where id=#{id}
|
||||
update ${tabName} set ${receiptFiled} =#{receipt} where id=#{dataId}
|
||||
</update>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue