Compare commits

...

216 Commits
master ... kjs

Author SHA1 Message Date
yuqh 31f9aa0f3d 对接吉客云代码 2025-04-25 11:08:43 +08:00
yuqh e91f79a6ec 对接吉客云代码 2025-04-23 16:01:42 +08:00
yuqh 2009457598 1 2025-03-28 09:06:35 +08:00
yuqh c79e8312bf 1 2025-03-28 09:05:18 +08:00
yuqh a54faadbd5 U8接口业务新增 2025-03-21 13:40:27 +08:00
yuqh d189458a82 U8接口业务新增 2025-03-19 09:54:38 +08:00
yuqh 7de3720668 U8接口业务新增 2025-03-05 15:52:27 +08:00
yuqh bc422469a7 修复主数据下发%问题 2025-01-15 14:11:25 +08:00
yuqh 11440a8169 修复主数据下发%问题 2025-01-15 14:11:05 +08:00
yuqh eeeb63b599 Merge remote-tracking branch 'origin/kjs' into kjs 2025-01-15 14:10:28 +08:00
yuqh 4ba5e21071 修复主数据下发%问题 2025-01-15 14:09:37 +08:00
hecan dc84b28c0d Merge branch 'kjs' of http://192.168.2.237:3000/root/kangarooDataCenterV3 into kjs 2024-12-20 11:48:50 +08:00
hecan a67169e97a 通用数据写入日志增加错误返回信息 2024-12-20 11:48:36 +08:00
yuqh 78b3fa5dac 修复主数据下发%问题 2024-12-19 15:18:45 +08:00
yuqh 858a6e4ce8 会稽山对接CRM代码 2024-12-05 18:00:46 +08:00
yuqh bece2f2ed0 会稽山对接CRM代码 2024-12-03 14:55:57 +08:00
yuqh 4836f217a2 会稽山对接CRM代码 2024-11-25 11:35:18 +08:00
yuqh b7916bbfb4 修复部门和人员删除之后查询钉钉接口失败的问题 2024-11-21 09:27:00 +08:00
yuqh 79c44e1f2d Merge remote-tracking branch 'origin/kjs' into kjs 2024-11-18 18:18:48 +08:00
yuqh 0cf6783b62 对接CRM冻结解冻接口开发 2024-11-18 18:18:38 +08:00
hecan 988a7789b6 通用数据,如果是钉钉人员或者钉钉部门,增加或者修改时候先删除明细再增加明细,增加明细判断,有明细在删除 2024-11-12 15:24:21 +08:00
yuqh 72b0b58722 1 2024-11-10 15:48:44 +08:00
xiang2lin 9f02f730c9 fix: 加锁,限制并发导致数据重复 2024-11-08 08:35:06 +08:00
xiang2lin ec06ed2272 Merge branch 'kjs' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into kjs 2024-11-06 13:27:39 +08:00
hecan 8777a09e1c 通用数据,如果是钉钉人员或者钉钉部门,增加或者修改时候先删除明细再增加明细 2024-11-05 17:52:25 +08:00
yuqh e6c17411c6 1 2024-11-05 15:23:34 +08:00
yuqh db51ea4fad 1 2024-11-05 15:21:44 +08:00
yuqh c57ca0f43c 1 2024-11-05 15:14:51 +08:00
yuqh 77dc2936b1 1 2024-11-05 15:13:10 +08:00
yuqh 740c31fe5c Merge branch 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into kjs
# Conflicts:
#	buildpackage/pom.xml
#	buildpackage/src/main/resources/application-dongj.yml
#	buildpackage/src/main/resources/application-kjs.yml
#	buildpackage/src/test/java/com/hzya/frame/temButtom.java
#	pom.xml
#	service/src/main/java/com/hzya/frame/dingtalk/service/IDingTalkService.java
#	service/src/main/java/com/hzya/frame/dingtalk/service/impl/DingTalkServiceImpl.java
#	service/src/main/java/com/hzya/frame/sysnew/comparison/service/impl/ComparisonServiceImpl.java
#	service/src/main/java/com/hzya/frame/sysnew/grovy/service/impl/GroovyIntegrationServiceImpl.java
#	webapp/src/main/java/com/hzya/frame/webapp/entrance/controler/EntranceController.java
2024-11-05 15:06:07 +08:00
yuqh 00fec98bed 新增对接CRM插件 2024-11-05 15:01:55 +08:00
yuqh fa3202304b Merge remote-tracking branch 'origin/dongj' into dongj 2024-11-05 14:29:40 +08:00
yuqh 2400d08a93 新增对接CRM插件 2024-11-05 14:29:29 +08:00
lvleigang 4d73583183 分组类型查询单据 2024-11-04 08:39:02 +08:00
lvleigang 365b53a728 Merge branch 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-11-04 08:38:32 +08:00
lvleigang f845f4ed26 分组类型查询单据 2024-11-04 08:38:23 +08:00
476474485@qq.com 2c6d81919b 调整关联查询入库单,没有过滤删除状态,修改为dr=0 2024-11-02 11:41:31 +08:00
yuqh 5384bd7520 新增对接CRM插件 2024-11-01 15:14:24 +08:00
yuqh 87d554ba64 新增对接CRM插件 2024-11-01 15:13:46 +08:00
yuqh dccbb4cebf 新增对接CRM插件 2024-11-01 15:13:18 +08:00
lvleigang 7570880778 分组类型查询单据 2024-11-01 09:14:55 +08:00
476474485@qq.com 9d94eb0f23 Merge remote-tracking branch 'origin/dongj' into dongj 2024-11-01 08:37:02 +08:00
476474485@qq.com 0fc94df996 修改销售发票未审核同步U8C 2024-11-01 08:28:48 +08:00
lvleigang 1733ec7c54 修改查询类型 2024-10-31 10:15:42 +08:00
lvleigang c596b42646 修改查询类型 2024-10-31 08:49:39 +08:00
yuqh 322bca4887 新增对接CRM插件 2024-10-18 10:44:52 +08:00
lvleigang f17ade4145 还原转发接口 2024-10-18 09:23:50 +08:00
lvleigang d1687abd91 东进销售订单删除接口,新增删除oa销售合同接口 2024-10-18 09:16:15 +08:00
lvleigang ef957a0055 Merge branch 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-10-18 08:52:18 +08:00
lvleigang a20359be42 澳星修改转发获取header参数的名称 2024-10-18 08:52:02 +08:00
yuqh 7066e2bec6 销售订单同步OA代码 2024-10-17 16:34:04 +08:00
yuqh f15c2f1d9b 销售订单同步OA代码 2024-10-17 16:33:46 +08:00
yuqh 11431c76b7 销售订单同步OA代码 2024-10-17 16:33:26 +08:00
lvleigang bb5aa51255 修改请求 2024-10-17 11:28:03 +08:00
lvleigang 937395744e 修改请求 2024-10-17 10:29:31 +08:00
xiang2lin 20ebbfde8e fix: 多职位保存子表时没有data_id处理 2024-10-14 18:19:10 +08:00
yuqh 2fbab4e853 徐新路代码 2024-10-14 17:01:36 +08:00
yuqh f11dba5d41 Merge remote-tracking branch 'origin/dongj' into dongj 2024-10-14 15:21:05 +08:00
yuqh c8d95fe335 修复获取银行流水报错了不继续执行问题 2024-10-14 15:20:47 +08:00
xiang2lin 0ce77b3ea3 通讯录订阅事件打印错误日志 2024-10-10 16:54:19 +08:00
xiang2lin b0f95f3478 注释掉没用的代码 2024-10-09 15:46:02 +08:00
xiang2lin 473435ab21 feat: 增加OA付款审批单流程结束传u8c插件配置 2024-10-09 15:45:27 +08:00
xiang2lin 7069df374e feat: OA付款审批单流程结束传u8c拆分成独立的插件 2024-10-09 15:44:49 +08:00
xiang2lin 697a898844 公司编码修改 2024-10-09 11:17:01 +08:00
xiang2lin e9bdcfe9bd fix: 销售开票审批结果传到u8c接口修改,用新的审批接口
2024年10月8日10:16:44
2024-10-08 10:16:56 +08:00
xiang2lin 9f748783bc fix: 销售开票审批人修改 改成15715849962 2024-09-30 11:39:20 +08:00
xiang2lin f893941710 feat: 中台端口修改, 9999改成8901 2024-09-30 10:25:16 +08:00
xiang2lin b4021a91e2 Merge branch 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-09-29 16:36:45 +08:00
xiang2lin 2cfeec1f99 feat: u8c审批帐号修改 ,从hzya修改成15715849962 内部群里贺灿让改的 2024-09-29 16:25:26 +08:00
yuqh 59ce4792f9 1 2024-09-26 10:24:34 +08:00
yuqh 42deacdc7d 1 2024-09-24 14:51:58 +08:00
yuqh 3ab107390c Merge remote-tracking branch 'origin/dongj' into dongj 2024-09-24 09:38:56 +08:00
yuqh c814e0c475 调整收款单推送U8C字段 2024-09-24 09:38:37 +08:00
xiang2lin 917ea1fa5d Merge branch 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-09-20 10:09:20 +08:00
xiang2lin 86aac2c3f5 修改更新底表的语句
2024年9月20日10:08:56
2024-09-20 10:09:01 +08:00
yuqh 8a3dcc44ab 调整收款单推送U8C字段 2024-09-19 11:20:33 +08:00
xiang2lin 4ede4a65ef Merge branch 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj
# Conflicts:
#	buildpackage/src/test/java/com/hzya/frame/temButtom.java
2024-09-19 09:33:12 +08:00
xiang2lin 97f57a493f 修改中台接口地址 9999改成8901
2024年9月19日09:31:50
2024-09-19 09:32:07 +08:00
yuqh f1604d68eb 修复服务器调用错误 2024-09-18 08:51:30 +08:00
yuqh 00eebd3fb5 修复服务器调用错误 2024-09-18 08:50:13 +08:00
yuqh d182dec59c 修复主数据显示问题 2024-09-14 14:28:20 +08:00
yuqh 6055a0954c 调整主数据下发条数 2024-09-13 10:48:05 +08:00
yuqh 08c8cb3e30 修复主数据新增接报错 2024-09-12 13:37:34 +08:00
yuqh 553ea0376c Merge branch 'dev' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-09-11 14:36:40 +08:00
yuqh 18391d9f95 Merge remote-tracking branch 'origin/kjs' into kjs 2024-09-11 14:32:06 +08:00
yuqh e7128a50a1 修复配置文件读取不到 启动不成功问题 2024-09-11 14:31:55 +08:00
xiang2lin 1bc08ad2e6 Merge branch 'kjs' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into kjs 2024-09-10 16:41:36 +08:00
xiang2lin 5213bb530e @Value注解默认值修改
2024年9月10日16:41:14
2024-09-10 16:41:19 +08:00
yuqh d7d1ef5078 修复配置文件读取不到 启动不成功问题 2024-09-10 16:32:28 +08:00
yuqh f68aaa9298 删除无用的配置文件 2024-09-10 15:30:04 +08:00
yuqh 22c6414dd1 删除无用的配置文件 2024-09-10 09:43:24 +08:00
yuqh 8ed593f536 OA无流程表单公用删除接口 2024-09-10 09:42:58 +08:00
yuqh 1885e7f670 Merge branch 'kjs' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into kjs
# Conflicts:
#	webapp/src/main/java/com/hzya/frame/webapp/entrance/controler/EntranceController.java
2024-09-10 09:37:27 +08:00
yuqh 3cbaa782d6 1 2024-09-10 08:43:33 +08:00
yuqh 6a45c88a18 1 2024-09-10 08:42:02 +08:00
yuqh c5eaaf9207 OA无流程表单公用删除接口 2024-09-10 08:34:43 +08:00
yuqh 72f98441a1 Merge branch 'dev' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-09-09 15:28:54 +08:00
yuqh ed40e4f4c8 Merge branch 'dev' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj
# Conflicts:
#	buildpackage/src/main/resources/application-xel.yml
#	buildpackage/src/test/java/com/hzya/frame/temButtom.java
#	service/src/main/java/com/hzya/frame/seeyon/util/RestUtil.java
#	service/src/main/java/com/hzya/frame/sysnew/comparison/service/impl/ComparisonServiceImpl.java
2024-09-09 14:13:40 +08:00
xiang2lin 8dbf6fffb4 mdm_up_id先不加,前台不显示默认字段, 要在这个字段上设置treeselect关系
2024年9月5日21:21:55
2024-09-05 21:22:03 +08:00
xiang2lin 67b8d900bb 给bean增加value
2024年9月5日17:13:13
2024-09-05 17:13:18 +08:00
xiang2lin f734a925f8 增加生产订单行号字段
2024年9月5日14:52:14
2024-09-05 14:52:21 +08:00
xiang2lin 6987ac8381 增加获取部门列表,部门下人员接口
2024年9月4日11:05:43
2024-09-04 11:05:48 +08:00
xiang2lin b5564c592a 打印脚本入参
2024年9月4日11:04:51
2024-09-04 11:04:58 +08:00
xiang2lin d8fcae24d8 钉钉通讯录初始化到中台主数据
2024年9月4日11:04:04
2024-09-04 11:04:28 +08:00
xiang2lin eb733789bb 主数据通用保存接口处理树形结构数据
2024年9月4日11:03:18
2024-09-04 11:03:28 +08:00
xiang2lin 11ee79ed1e dd用户groovy脚本
2024年9月2日16:02:28
2024-09-02 16:02:36 +08:00
xiang2lin c7a304f2e0 钉钉通讯录配置
2024年9月2日16:02:09
2024-09-02 16:02:13 +08:00
xiang2lin 5c8481ef33 生产订单、发货单同步wms
2024年9月2日13:37:59
2024-09-02 13:38:16 +08:00
xiang2lin ea109c3b39 增加lasttime字段
2024年9月2日09:52:13
2024-09-02 09:52:19 +08:00
xiang2lin 14dd5c798a 增加lasttime字段
2024年9月2日09:19:09
2024-09-02 09:19:19 +08:00
xiang2lin ad389b9f16 签名方法 publicKey 和 secrekey修改
2024年8月31日15:20:30
2024-08-31 15:20:37 +08:00
xiang2lin a73c59fdc0 增加test方法,测试主数据下发
2024年8月30日16:13:53
2024-08-30 16:14:01 +08:00
yuqh 1401d78199 Merge remote-tracking branch 'origin/kjs' into kjs
# Conflicts:
#	webapp/src/main/java/com/hzya/frame/webapp/entrance/controler/EntranceController.java
2024-08-30 15:58:34 +08:00
yuqh f16fb0412f 1 2024-08-30 15:57:31 +08:00
xiang2lin b28d8bd363 钉钉扩展类
2024年8月29日 15:59:17
2024-08-29 15:59:24 +08:00
xiang2lin c92fe69051 pom修改 2024-08-29 15:58:49 +08:00
xiang2lin 2eb9960f23 钉钉通讯录事件监听,保存到mdm
2024年8月29日 15:58:19
2024-08-29 15:58:25 +08:00
xiang2lin 0727770457 @Value赋默认值修改
/2024年8月29日15:57:02
2024-08-29 15:57:19 +08:00
xiang2lin 41fd5fbac6 xel配置文件修改
2024年8月29日15:55:38
2024-08-29 15:55:43 +08:00
xiang2lin a0c21a5a39 TOMCATPATH @Value赋默认值
2024年8月29日15:54:27
2024-08-29 15:54:38 +08:00
xiang2lin 6df67f2fe6 主数据修改时返回查询失败问题修改
2024年8月29日15:53:12
2024-08-29 15:53:25 +08:00
xiang2lin 9ad3b8d52b 从dev更新后 合并冲突
2024年8月28日14:19:18
2024-08-28 14:19:23 +08:00
xiang2lin 1d3bf1d6e9 Merge branch 'dev' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into kjs
# Conflicts:
#	buildpackage/pom.xml
#	webapp/src/main/java/com/hzya/frame/webapp/entrance/controler/EntranceController.java
2024-08-28 14:18:50 +08:00
xiang2lin 0d7be1c3ac 审批意见改成审批通过
2024年8月28日11:57:40
2024-08-28 11:57:46 +08:00
xiang2lin 529a3a9764 1、钉钉通讯录事件订阅
2、@Value配置修改
2024年8月28日11:13:13
2024-08-28 11:13:39 +08:00
xiang2lin 4637728035 钉钉通讯录事件订阅
2024年8月28日11:01:59
2024-08-28 11:02:11 +08:00
xiang2lin 0de8911009 钉钉免登接口
2024年8月28日10:59:51
2024-08-28 10:59:56 +08:00
xiang2lin b2ac424563 钉钉sdk
2024年8月28日10:59:27
2024-08-28 10:59:35 +08:00
xiang2lin 1a99b6b4f4 测试类
2024年8月28日10:58:01
2024-08-28 10:58:07 +08:00
xiang2lin 593b895e49 增加本地配置
2024年8月28日10:55:37
2024-08-28 10:55:45 +08:00
xiang2lin 4e5d74c6c0 Merge branch 'kjs' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into kjs 2024-08-27 13:58:54 +08:00
xiang2lin 1b300d0bfa u8c审批接口修改
2024年8月27日13:56:53
2024-08-27 13:57:55 +08:00
xiang2lin ea44b43c0e u8c审批接口修改
2024年8月27日13:56:53
2024-08-27 13:57:01 +08:00
xiang2lin eb74a51dbe @Value("${OA.data_source_code:}")修改
2024年8月27日09:00:42
2024-08-27 09:00:48 +08:00
yuqh 5d940a94e9 1 2024-08-26 17:07:19 +08:00
yuqh 1a33683845 Merge branch 'dev' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into kjs
# Conflicts:
#	buildpackage/src/main/resources/application-hclocal.yml
#	buildpackage/src/main/resources/application-kjs.yml
#	buildpackage/src/main/resources/application-llg.yml
#	buildpackage/src/main/resources/application-local.yml
#	buildpackage/src/main/resources/application-xel.yml
#	buildpackage/src/main/resources/application-yc.yml
#	buildpackage/src/main/resources/application-ydc.yml
#	buildpackage/src/main/resources/application-yuqh.yml
2024-08-26 15:49:39 +08:00
yuqh 0979242f08 1 2024-08-26 15:49:15 +08:00
yuqh 89acc487b5 1 2024-08-26 15:48:25 +08:00
xiang2lin ab4a31b8f1 @Value("${OA.data_source_code:}")修改
2024年8月26日11:11:33
2024-08-26 11:11:37 +08:00
xiang2lin cb90fc4530 @Vaule注解修改
2024年8月26日10:39:01
2024-08-26 10:39:06 +08:00
xiang2lin db12aa6544 保存日志时增加推送日期字段
2024年8月23日23:16:21
2024-08-23 23:16:26 +08:00
xiang2lin 4b606ff361 请求参数里的startTime和endTime修改
2024年8月23日22:38:26
2024-08-23 22:38:32 +08:00
yuqh 6774a7746a Merge remote-tracking branch 'origin/kjs' into kjs 2024-08-23 19:21:12 +08:00
yuqh cbb165786e 1 2024-08-23 19:21:00 +08:00
xiang2lin 1b7db9826a 配置文件修改
2024年8月23日19:11:57
2024-08-23 19:12:00 +08:00
xiang2lin f450395718 kjs发货单、生产订单修改
2024年8月23日19:11:30
2024-08-23 19:11:43 +08:00
yuqh c504012232 1 2024-08-23 18:36:46 +08:00
yuqh a3ee2d198c 1 2024-08-23 17:42:04 +08:00
yuqh 182488b200 1 2024-08-23 17:41:51 +08:00
yuqh be2578ee32 Merge remote-tracking branch 'origin/kjs' into kjs 2024-08-23 15:55:25 +08:00
yuqh 3dd4c5adaf 新增U8主数据抽取 2024-08-23 15:55:06 +08:00
xiang2lin 1a82f55e41 生产订单 重试日志保存
2024年8月23日11:36:33
2024-08-23 11:36:38 +08:00
xiang2lin e6fa8f9f9b 发货单、生产订单插件配置文件
2024年8月23日11:35:08
2024-08-23 11:35:12 +08:00
xiang2lin 73bed70c3b u8生产订单、发货单同步wms接口开发
2024年8月23日11:34:28
2024-08-23 11:34:38 +08:00
xiang2lin 12ef47d4fc Merge branch 'kjs' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into kjs 2024-08-22 18:41:17 +08:00
xiang2lin a4e1250a0a 增加mapstruct依赖
2024年8月22日18:40:46
2024-08-22 18:40:51 +08:00
xiang2lin f58e5ba4da 发货单接口
2024年8月22日18:40:17
2024-08-22 18:40:24 +08:00
yuqh f7a458522b 1 2024-08-22 17:37:31 +08:00
yuqh a673be253b 1 2024-08-22 17:36:54 +08:00
yuqh 890572040b Merge remote-tracking branch 'origin/kjs' into kjs 2024-08-22 17:36:32 +08:00
yuqh 1b952de12b 1 2024-08-22 17:36:22 +08:00
xiang2lin fa6ab75223 xel日志文件配置修改
2024年8月22日14:37:04
2024-08-22 14:41:58 +08:00
xiang2lin 238c41add4 Merge branch 'kjs' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into kjs 2024-08-22 14:38:42 +08:00
xiang2lin 0e195f5133 Merge branch 'kjs' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into kjs 2024-08-22 14:37:29 +08:00
xiang2lin 6ee889d475 xel日志文件配置修改
2024年8月22日14:37:04
2024-08-22 14:37:09 +08:00
yuqh a6576753b4 1 2024-08-22 14:36:18 +08:00
yuqh 08d18d4dbc 1 2024-08-22 14:36:04 +08:00
xiang2lin 902d6933c3 测试类
2024年8月14日 13:32:44
2024-08-14 13:32:49 +08:00
xiang2lin eeeae913da 附件处理
2024年8月14日 13:31:45
2024-08-14 13:31:50 +08:00
yuqh f238847fc4 Merge remote-tracking branch 'origin/dongj' into dongj 2024-08-08 09:55:54 +08:00
yuqh 59840afc97 1 2024-08-08 09:55:40 +08:00
xiang2lin 45576106c7 Merge branch 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-08-07 09:47:11 +08:00
xiang2lin 0cf730bb43 增加附件上传接口
2024年8月7日 09:45:52
2024-08-07 09:46:05 +08:00
yuqh 9f6009bd96 1 2024-08-06 15:44:18 +08:00
yuqh cc4db3ae5c Merge remote-tracking branch 'origin/dongj' into dongj 2024-08-06 15:43:59 +08:00
yuqh 8ece0ab087 1 2024-08-06 15:43:39 +08:00
xiang2lin 5ce5818c94 2106行 宁波银行返回参数解析 data改成 Data
2024年8月5日 17:07:23
2024-08-05 17:07:46 +08:00
xiang2lin 42b10acc82 增加附件下载接口
2024年8月5日 16:42:46
2024-08-05 16:42:53 +08:00
lvleigang 37815377e7 Merge branch 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-08-05 15:45:17 +08:00
lvleigang c5664ad86b 东进OA审批结果回传U8C 2024-08-05 15:45:09 +08:00
hecan 99ad32eb0a 新增接口中根据data_id判断数据是否已经保存过 2024-08-05 11:56:08 +08:00
xiang2lin ae561ea8b8 T/T汇款配置文件
2024年8月5日 09:25:50
2024-08-05 09:25:54 +08:00
xiang2lin e200fd768d Merge branch 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-08-05 09:23:11 +08:00
xiang2lin 6d3ce7042f T/T汇款
2024年8月5日 09:18:23
2024-08-05 09:18:33 +08:00
lvleigang e6f9c5824e 主数据修改 2024-08-02 15:57:52 +08:00
yuqh 7c3b189530 Merge remote-tracking branch 'origin/dongj' into dongj
# Conflicts:
#	buildpackage/src/main/java/com/hzya/frame/plugin/mdmDistribute/plugin/MdmModulePluginInitializer.java
2024-08-02 15:21:04 +08:00
yuqh 57ad64fb6d 1 2024-08-02 15:20:21 +08:00
lvleigang ca14226903 oa销售开票审核状态同步u8c 2024-08-02 10:34:00 +08:00
lvleigang a555abda9c Merge branches 'dev' and 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj
 Conflicts:
	buildpackage/src/main/java/com/hzya/frame/plugin/mdmDistribute/plugin/MdmModulePluginInitializer.java
2024-08-02 10:05:59 +08:00
yuqh 331b0f03e0 Merge branch 'dev' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-08-02 09:33:19 +08:00
yuqh 110d08f7f7 Merge branch 'dev' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj
 Conflicts:
	buildpackage/src/main/java/com/hzya/frame/plugin/mdmDistribute/plugin/MdmModulePluginInitializer.java
2024-08-02 08:57:34 +08:00
yuqh 08567f88f7 1 2024-08-02 08:56:27 +08:00
yuqh 33d5f8f320 1 2024-08-02 08:55:48 +08:00
yuqh a0ed5ea73a Merge remote-tracking branch 'origin/dongj' into dongj 2024-07-31 19:00:40 +08:00
yuqh 9b23c66998 1 2024-07-31 19:00:27 +08:00
username 3fa71d45f6 Merge branch 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-07-31 15:28:29 +08:00
username 0495fda264 同步生成收款单接口 2024-07-31 15:27:38 +08:00
yuqh 2f32b3c0d8 Merge branches 'dev' and 'dongj' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj
 Conflicts:
	service/src/main/java/com/hzya/frame/ningboBankTreasury/service/impl/NingboBankTreasuryServiceImpl.java
2024-07-31 14:49:38 +08:00
xiang2lin cf0f756f2f 宁波银行接口
2024年7月31日 14:40:22
2024-07-31 14:40:26 +08:00
xiang2lin f8fb7c91c3 Merge remote-tracking branch 'origin/dongj' into dongj 2024-07-30 17:34:17 +08:00
xiang2lin 2301365d08 宁波银行接口
2024年7月30日 17:33:52
2024-07-30 17:33:59 +08:00
xiang2lin 1eac206f28 宁波银行接口
2024年7月30日 09:17:43
2024-07-30 09:18:28 +08:00
username 29a0b03f14 同步生成收款单接口 2024-07-29 17:48:06 +08:00
username 9090ca3dfa 配置文件 2024-07-29 17:23:09 +08:00
xiang2lin 7f9a513305 币种枚举
2024年7月29日 15:15:01
2024-07-29 15:15:03 +08:00
xiang2lin e6239e89bc ningboBank工具类
2024年7月26日 17:22:22
2024-07-26 17:22:25 +08:00
xiang2lin 1221059d06 本地配置 2024-07-26 16:43:29 +08:00
xiang2lin 765f35b3e6 测试类 2024-07-26 16:43:00 +08:00
xiang2lin 3a768e1dcc 收款记录保存
2024年7月26日 15:19:46
2024-07-26 15:19:51 +08:00
xiang2lin 4f798570f0 收款记录保存
2024年7月26日 15:18:41
2024-07-26 15:18:47 +08:00
xiang2lin 11d418a5b3 收款记录保存
2024年7月26日 15:16:33
2024-07-26 15:16:39 +08:00
xiang2lin d07b4eea66 Merge branch 'dev' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-07-26 14:33:26 +08:00
xiang2lin e5c27bd860 东进配置
只push了dongj这个分支
2024年7月26日 14:14:06
2024-07-26 14:14:32 +08:00
xiang2lin 2b544b4e32 Merge branch 'dev' of http://ufidahz.com.cn:9015/root/kangarooDataCenterV3 into dongj 2024-07-25 15:49:25 +08:00
xiang2lin 93d9fc2224 宁波银行交易明细查询接口
2024年7月25日 15:48:44
2024-07-25 15:48:51 +08:00
xiang2lin af5a85b748 环境修改
2024年7月25日 10:04:08
2024-07-25 10:04:11 +08:00
320 changed files with 24672 additions and 823 deletions

7
.gitignore vendored
View File

@ -19,7 +19,7 @@ Icon
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
*.iml
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
@ -60,3 +60,8 @@ $RECYCLE.BIN/
/common/target/
/buildpackage/target/
/webapp/target/
/E:/yongansystem/log/2024-10-15/
/base-buildpackage/target/
/base-common/target/
/base-core/target/
/fw-weixin/target/

View File

@ -17,21 +17,21 @@
<artifactId>webapp</artifactId>
<version>${revision}</version>
</dependency>
<!-- &lt;!&ndash; 淘宝奇门sdk&ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.reabam.sdk</groupId>-->
<!-- <artifactId>reabam-sdk-java</artifactId>-->
<!-- <version>1.0</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/openapi-sdk-1.0.0.jar</systemPath>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.taobao.qmsdk</groupId>-->
<!-- <artifactId>taobao-sdk-java-auto</artifactId>-->
<!-- <version>1.1</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/taobao-sdk-java-auto-1.1.jar</systemPath>-->
<!-- </dependency>-->
<!-- &lt;!&ndash; 淘宝奇门sdk&ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.reabam.sdk</groupId>-->
<!-- <artifactId>reabam-sdk-java</artifactId>-->
<!-- <version>1.0</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/openapi-sdk-1.0.0.jar</systemPath>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.taobao.qmsdk</groupId>-->
<!-- <artifactId>taobao-sdk-java-auto</artifactId>-->
<!-- <version>1.1</version>-->
<!-- <scope>system</scope>-->
<!-- <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/taobao-sdk-java-auto-1.1.jar</systemPath>-->
<!-- </dependency>-->
</dependencies>
@ -45,58 +45,11 @@
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>dev</id> <!--开发环境-->
<id>kjs</id> <!--会稽山-->
<properties>
<profile.active>dev</profile.active>
</properties>
</profile>
<profile>
<id>ax</id> <!--澳星-->
<properties>
<profile.active>ax</profile.active>
</properties>
</profile>
<profile>
<id>hclocal</id> <!--何灿-->
<properties>
<profile.active>hclocal</profile.active>
</properties>
</profile>
<profile>
<id>llg</id> <!--吕磊钢-->
<properties>
<profile.active>llg</profile.active>
</properties>
</profile>
<profile>
<id>zqtlocal</id> <!--曾庆拓-->
<properties>
<profile.active>zqtlocal</profile.active>
</properties>
</profile>
<profile>
<id>yuqh</id> <!--于群辉-->
<properties>
<profile.active>yuqh</profile.active>
</properties>
</profile>
<profile>
<id>xel</id> <!--相二林-->
<properties>
<profile.active>xel</profile.active>
</properties>
</profile>
<profile>
<id>ydc</id> <!--英德赛-->
<properties>
<profile.active>ydc</profile.active>
</properties>
</profile>
<profile>
<id>yc</id> <!--越城区-->
<properties>
<profile.active>yc</profile.active>
<profile.active>kjs</profile.active>
</properties>
</profile>
</profiles>

View File

@ -0,0 +1,36 @@
package com.hzya.frame.plugin.a8bill.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.mdm.mdmModuleSource.entity.MdmModuleSourceEntity;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
import java.util.HashMap;
import java.util.List;
/**
* 组织档案(mdm_org: table)表数据库访问层
*
* @author makejava
* @since 2024-06-07 18:30:04
*/
public interface IPayBillPluginInitializerDao extends IBaseDao<PayBillEntity, String> {
/**
*
* @content 通用获取OA数据接口
* @author laborer
* @date 2024/7/10 0010 16:06
*
*/
List<HashMap<String, Object>> getOaBillData(String str , PayBillEntity entity)throws Exception;
/**
*
* @content 通过ID修改单据状态
* @author laborer
* @date 2024/7/10 0010 17:32
*
*/
int updateStateForId(String str , PayBillEntity entity)throws Exception;
}

View File

@ -0,0 +1,33 @@
package com.hzya.frame.plugin.a8bill.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.execsql.service.IExecSqlService;
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
import java.util.List;
/**
* 组织档案(MdmOrg)表数据库访问层
*
* @author makejava
* @since 2024-06-07 18:30:04
*/
public class PayBillPluginInitializerDaoImpl extends MybatisGenericDao<PayBillEntity, String> implements IPayBillPluginInitializerDao {
@Autowired
private IExecSqlService execSqlService;
@DS("#entity.dataSourceCode")
@Override
public List<HashMap<String, Object>> getOaBillData(String str, PayBillEntity entity)throws Exception {
return execSqlService.execSelectSql(str, "");
}
@DS("#entity.dataSourceCode")
@Override
public int updateStateForId(String str , PayBillEntity entity)throws Exception {
return super.update("com.hzya.frame.plugin.a8bill.dao.impl.PayBillPluginInitializerDaoImpl.PayBillEntity_update",entity);
}
}

View File

@ -9,6 +9,14 @@ import com.hzya.frame.web.entity.BaseEntity;
* @since 2024-06-07 18:30:04
*/
public class PayBillEntity extends BaseEntity {
private String sql;
public String getSql() {
return sql;
}
public void setSql(String sql) {
this.sql = sql;
}
}

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.plugin.a8bill.dao.impl.PayBillDaoImpl">
<mapper namespace="com.hzya.frame.plugin.a8bill.dao.impl.PayBillPluginInitializerDaoImpl">
<resultMap id="get-PayBillEntity-result" type="com.hzya.frame.plugin.a8bill.entity.PayBillEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
@ -11,6 +11,11 @@
id
</sql>
<!--执行update语句-->
<update id="PayBillEntity_update" parameterType="com.hzya.frame.plugin.a8bill.entity.PayBillEntity">
<if test="null != sql and sql != ''">
${sql}
</if>
</update>
</mapper>

View File

@ -0,0 +1,158 @@
package com.hzya.frame.plugin.a8bill.plugin;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.ningboBankTreasury.dto.req.AccTransactionReq;
import com.hzya.frame.ningboBankTreasury.dto.res.AccTransactionRes;
import com.hzya.frame.ningboBankTreasury.util.NingboBankUtil;
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description 查询宁波银行账户交易明细 保存到OA
* @Author xiangerlin
* @Date 2024/7/25 16:24
**/
public class AccLogPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private INingboBankPluginService ningboBankPluginService;
@Value("${OA.data_source_code:}")
private String oa_data_source_code;
@Autowired
private IPayBillPluginInitializerDao payBillDao;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "AccLogPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "查询交易明细插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "AccLogPlugin";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
//查询银行账户列表
PayBillEntity oaBillEntity = new PayBillEntity();
oaBillEntity.setDataSourceCode(oa_data_source_code);
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData("SELECT field0002 from formmain_0053",oaBillEntity);
List<String> accList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(hashMaps)){
for (HashMap<String, Object> hashMap : hashMaps) {
String field0002 = String.valueOf(hashMap.get("field0002"));
accList.add(field0002);
}
}
accList = Convert.toList(String.class,"86041110000110293,86041110000109337,6223160030547665,6214180002001411023,6214180000002609736");
//1查询宁波银行的交易记录
AccTransactionReq accTransactionReq = new AccTransactionReq();
accTransactionReq.setCdSign(NingboBankUtil.SHOURU);
accTransactionReq.setBeginDate(DateUtil.format(DateUtil.yesterday(),"yyyy-MM-dd"));
accTransactionReq.setEndDate(DateUtil.today());
accTransactionReq.setBankAccList(accList);
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
.put("apiCode", "8000360002")
.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
.put("appId","800036")
.build();
String body = HttpRequest.post("http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(JSONObject.toJSONString(accTransactionReq)).timeout(60000).execute().body();
System.out.println(body);
if (StrUtil.isNotEmpty(body)){
JSONObject response = JSONObject.parseObject(body);
if (response.getBoolean("flag")){
List<AccTransactionRes> accTransactionResList = JSONObject.parseArray(response.getJSONObject("attribute").getString("attribute"), AccTransactionRes.class);
//2保存到OA底表
if (CollectionUtils.isNotEmpty(accTransactionResList)){
ningboBankPluginService.saveAccLog(accTransactionResList);
}
return BaseResult.getSuccessMessageEntity(getPluginName()+"执行成功:{}",accTransactionResList);
}
}
return BaseResult.getSuccessMessageEntity(getPluginName()+"执行成功");
}
}

View File

@ -0,0 +1,144 @@
package com.hzya.frame.plugin.a8bill.plugin;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
/**
* @Description
* @Author xiangerlin
* @Date 2024/7/29 11:08
**/
public class NingboBankPayPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private INingboBankPluginService ningboBankPluginService;
@Resource
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
@Autowired
private IPayBillPluginInitializerDao payBillDao;
@Value("${OA.data_source_code:}")
private String oa_data_source_code;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "NingboBankPayPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "宁波银行转账插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "宁波银行转账插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(),JSONObject.class);
String interId = requestJsonObj.getString("integration_task_living_details_id");
IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity();
if(StrUtil.isNotEmpty(interId)){
oldMsg = taskLivingDetailsService.get(interId);
}
String rootAppPk = oldMsg.getRootAppPk();
try {
StringBuffer sb = new StringBuffer();
if(StrUtil.isNotEmpty(rootAppPk)){
String code = requestJson.getString("code");
sb.append(" and id = '"+rootAppPk+"'");
}else{
sb.append(" and payState is null");
}
PayBillEntity oaBillEntity = new PayBillEntity();
oaBillEntity.setDataSourceCode(oa_data_source_code);
StringBuffer stringBuffer = new StringBuffer();
//付款单
stringBuffer.append("select * from v_hzya_pay where 1=1 " );
stringBuffer.append(sb.toString());
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData(stringBuffer.toString(),oaBillEntity);
ningboBankPluginService.payRequest(hashMaps,getPluginId(),"8000360000",interId);
} catch (Exception e) {
logger.info("获取OA数据失败"+e.getMessage());
e.printStackTrace();
}
return new JsonResultEntity("成功",true,new JsonResultEntity());
}
}

View File

@ -0,0 +1,129 @@
package com.hzya.frame.plugin.a8bill.plugin;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.ningboBankTreasury.enums.PayStatusEnum;
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description 宁波银行 单笔付款交易结果查询
* @Author xiangerlin
* @Date 2024/7/29 16:59
**/
public class NingboBankPayResultPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Value("${OA.data_source_code:}")
private String oa_data_source_code;
@Autowired
private IPayBillPluginInitializerDao payBillDao;
@Autowired
private INingboBankPluginService ningboBankPluginService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "NingboBankPayResultPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "宁波银行转账结果查询插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "宁波银行转账结果查询插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
PayBillEntity oaBillEntity = new PayBillEntity();
oaBillEntity.setDataSourceCode(oa_data_source_code);
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select * from v_hzya_pay where payState ='1'");
try {
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData(stringBuffer.toString(),oaBillEntity);
if(CollectionUtils.isNotEmpty(hashMaps)){
//查询交易结果
ningboBankPluginService.queryResult(hashMaps,"8000360001");
}
} catch (Exception e) {
e.printStackTrace();
}
return new JsonResultEntity("成功",true,new JsonResultEntity());
}
}

View File

@ -0,0 +1,147 @@
package com.hzya.frame.plugin.a8bill.plugin;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
/**
* @Description 外汇 TT 汇款
* @Author xiangerlin
* @Date 2024/8/1 14:33
**/
public class NingboBankTTPayPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private INingboBankPluginService ningboBankPluginService;
@Resource
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
@Autowired
private IPayBillPluginInitializerDao payBillDao;
@Value("${OA.data_source_code:}")
private String oa_data_source_code;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "NingboBankTTPayPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "宁波银行T/T汇款插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "宁波银行T/T汇款插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(),JSONObject.class);
String interId = requestJsonObj.getString("integration_task_living_details_id");
IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity();
if(StrUtil.isNotEmpty(interId)){
oldMsg = taskLivingDetailsService.get(interId);
}
String rootAppPk = oldMsg.getRootAppPk();
try {
StringBuffer sb = new StringBuffer();
if(StrUtil.isNotEmpty(rootAppPk)){
String code = requestJson.getString("code");
sb.append(" and id = '"+rootAppPk+"'");
}else{
sb.append(" and payState is null");
}
PayBillEntity oaBillEntity = new PayBillEntity();
oaBillEntity.setDataSourceCode(oa_data_source_code);
StringBuffer stringBuffer = new StringBuffer();
//付款单
stringBuffer.append("select * from v_hzya_pay_tt where 1=1 " );
stringBuffer.append(sb.toString());
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData(stringBuffer.toString(),oaBillEntity);
ningboBankPluginService.payRequest(hashMaps,getPluginId(),"8000360003",interId);
} catch (Exception e) {
logger.info("获取OA数据失败"+e.getMessage());
e.printStackTrace();
}
return new JsonResultEntity("成功",true,new JsonResultEntity());
}
}

View File

@ -0,0 +1,129 @@
package com.hzya.frame.plugin.a8bill.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
/**
* @Description TT汇款汇出交易结果查询
* @Author xiangerlin
* @Date 2024/8/2 10:47
**/
public class NingboBankTTPayResultPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private INingboBankPluginService ningboBankPluginService;
@Resource
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
@Autowired
private IPayBillPluginInitializerDao payBillDao;
@Value("${OA.data_source_code:}")
private String oa_data_source_code;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "NingboBankTTPayResultPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "宁波银行T/T汇款交易状态查询插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "宁波银行T/T汇款交易状态查询插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
PayBillEntity oaBillEntity = new PayBillEntity();
oaBillEntity.setDataSourceCode(oa_data_source_code);
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("select * from v_hzya_pay_tt where payState ='1'");
try {
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData(stringBuffer.toString(),oaBillEntity);
if(CollectionUtils.isNotEmpty(hashMaps)){
//查询交易结果
ningboBankPluginService.queryResult(hashMaps,"8000360007");
}
} catch (Exception e) {
e.printStackTrace();
}
return new JsonResultEntity("成功",true,new JsonResultEntity());
}
}

View File

@ -0,0 +1,154 @@
package com.hzya.frame.plugin.a8bill.plugin;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
/**
* @Description OA付款申请审批完成后传u8c
* @Author xiangerlin
* @Date 2024/10/9 14:19
**/
public class PayReqSyncU8CPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private INingboBankPluginService ningboBankPluginService;
@Resource
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
@Autowired
private IPayBillPluginInitializerDao payBillDao;
@Value("${OA.data_source_code:}")
private String oa_data_source_code;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "PayReqSyncU8CPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "付款申请审批结果传U8C";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "付款申请审批结果传U8C";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
logger.info("======开始执行付款申请审批结果传U8C========");
JSONObject requestJsonObj = JSON.parseObject(requestJson.toString(), JSONObject.class);
String integration_task_living_details_id = requestJsonObj.getString("integration_task_living_details_id");
IntegrationTaskLivingDetailsEntity oldMsg = new IntegrationTaskLivingDetailsEntity();
if (StrUtil.isNotEmpty(integration_task_living_details_id)) {
oldMsg = taskLivingDetailsService.get(integration_task_living_details_id);
}
String rootAppPk = oldMsg.getRootAppPk();
try {
StringBuffer sb = new StringBuffer();
if (StrUtil.isNotEmpty(rootAppPk)) {
sb.append(" and id = '" + rootAppPk + "'");
}else {
sb.append("and finishedflag = '1' and pushState is null");
}
PayBillEntity oaBillEntity = new PayBillEntity();
oaBillEntity.setDataSourceCode(oa_data_source_code);
StringBuffer stringBuffer = new StringBuffer();
//付款单
stringBuffer.append("SELECT * from v_hzya_payres_u8c WHERE 1= 1 ");
stringBuffer.append(sb.toString());
List<HashMap<String, Object>> hashMaps = payBillDao.getOaBillData(stringBuffer.toString(), oaBillEntity);
for (HashMap<String, Object> hashMap : hashMaps) {
JSONObject main = new JSONObject();
for (String key : hashMap.keySet()) {
main.put(key, hashMap.get(key));
}
logger.info("组装数据前"+JSON.toJSONString(hashMaps));
logger.info("组装数据前1"+main.toString());
ningboBankPluginService.updateU8CStatus(main,integration_task_living_details_id);
}
} catch (Exception e) {
logger.info("获取OA数据失败" + e.getMessage());
e.printStackTrace();
}
return BaseResult.getSuccessMessageEntity(getPluginName()+"执行成功");
}
}

View File

@ -0,0 +1,60 @@
package com.hzya.frame.plugin.a8bill.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.ningboBankTreasury.dto.res.AccTransactionRes;
import java.util.HashMap;
import java.util.List;
/**
* @Description 宁波银行插件用
* @Author xiangerlin
* @Date 2024/7/25 16:33
**/
public interface INingboBankPluginService {
/**
* 支付申请
* @param hashMaps oa 查到的数据
* @param pluginId 插件 id
* @param apiCode api 编码
* @param interId 重试 id
*/
void payRequest(List<HashMap<String, Object>> hashMaps,String pluginId,String apiCode,String interId);
/**
* 调用宁波银行esb接口
* @param params 参数
* @param apiCode 接口编码
* @param appId 应用id
* @return
*/
String executeEsb(String params,String apiCode,String appId);
/**
* 保存收款日志到oa底表
* @param accTransactionResList
*/
void saveAccLog(List<AccTransactionRes> accTransactionResList);
/**
* 查询交易结果
* @param hashMaps
* @param apiCode
*/
void queryResult(List<HashMap<String, Object>> hashMaps,String apiCode);
/**
* 查询OA附件并上传到宁波银行
* @param oaId oa主键id
* @return 宁波银行附件上传编码
*/
String fileUpload(String oaId);
/**
* 更新u8c单据状态
* @param jsonObject
* @param integration_task_living_details_id 重试id
*/
void updateU8CStatus(JSONObject jsonObject,String integration_task_living_details_id);
}

View File

@ -0,0 +1,479 @@
package com.hzya.frame.plugin.a8bill.service.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.ningboBankTreasury.dto.req.SingleTransferReq;
import com.hzya.frame.ningboBankTreasury.dto.req.TTRemitReq;
import com.hzya.frame.ningboBankTreasury.dto.res.AccTransactionRes;
import com.hzya.frame.ningboBankTreasury.enums.CurrencyEnum;
import com.hzya.frame.ningboBankTreasury.enums.PayStatusEnum;
import com.hzya.frame.ningboBankTreasury.enums.TTPayStatusEnum;
import com.hzya.frame.ningboBankTreasury.service.INingboBankTreasuryService;
import com.hzya.frame.plugin.a8bill.dao.IPayBillPluginInitializerDao;
import com.hzya.frame.plugin.a8bill.entity.PayBillEntity;
import com.hzya.frame.plugin.a8bill.service.INingboBankPluginService;
import com.hzya.frame.seeyon.dongj.entity.Formmain0044Entity;
import com.hzya.frame.seeyon.dongj.service.IFormmain0044Service;
import com.hzya.frame.seeyon.util.RestUtil;
import com.hzya.frame.stringutil.StringUtil;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Description 宁波银行插件用
* @Author xiangerlin
* @Date 2024/7/25 16:34
**/
public class NingboBankPluginServiceImpl implements INingboBankPluginService {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IFormmain0044Service formmain0044Service;
@Resource
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
@Autowired
private IPayBillPluginInitializerDao payBillDao;
@Autowired
private RestUtil restUtil;
@Autowired
private INingboBankTreasuryService ningboBankTreasuryService;
@Value("${OA.data_source_code:}")
private String oa_data_source_code;
/**
* 支付申请
* @param hashMaps oa 查到的数据
* @param pluginId 插件 id
* @param apiCode api 编码
* @param interId 重试 id
*/
@Override
public void payRequest(List<HashMap<String, Object>> hashMaps, String pluginId, String apiCode,String interId) {
if(CollectionUtils.isNotEmpty(hashMaps)){
PayBillEntity oaBillEntity = new PayBillEntity();
oaBillEntity.setDataSourceCode(oa_data_source_code);
for (HashMap<String, Object> hashMap : hashMaps) {
try {
JSONObject main = new JSONObject();
for(String key:hashMap.keySet()) {
main.put(key, hashMap.get(key));
}
String param = "";
//单笔转账
if ("8000360000".equals(apiCode)){
SingleTransferReq singleTransferReq = JSONObject.parseObject(main.toString(), SingleTransferReq.class);
param = JSONObject.toJSONString(singleTransferReq);
}else if("8000360003".equals(apiCode)){
//TT汇款
TTRemitReq ttRemitReq = JSONObject.parseObject(main.toString(), TTRemitReq.class);
//货到付款时要上传附件
if ("01".equals(ttRemitReq.getPayMode())){
String fileCode = fileUpload(main.getString("id"));
ttRemitReq.setFileUploadCodes(Convert.toList(String.class,fileCode));
}
param = JSONObject.toJSONString(ttRemitReq);
}
if (StrUtil.isEmpty(param)){
param = main.toString();
}
logger.info("获取到付款单的数据:{}",main.toString());
String result = this.executeEsb(param,apiCode,"800036");
logger.info("推送宁波银行的返回结果:{}",result);
IntegrationTaskLivingDetailsEntity logDetails = new IntegrationTaskLivingDetailsEntity();
logDetails.setRootAppPk(main.getString("id"));
logDetails.setRootAppBill(main.getString("serialNo"));
logDetails.setNewTransmitInfo(result);
logDetails.setNewPushDate(new Date());
logDetails.setRootAppNewData(JSON.toJSONString(main));
logDetails.setPluginId(pluginId);
JSONObject resultObj = JSON.parseObject(result);
String attribute = resultObj.getString("attribute");
boolean flag = resultObj.getBoolean("flag");
String subState = "";
String fieldName = main.getString("fieldName");
String tableName = main.getString("tableName");
String payMsg = main.getString("payMsg");
// String subMsg = main.getString("subMsg");
String str = "";
String sync_flag = "";
try {
if(StrUtil.isEmpty(interId)){// 银行状态 1支付中 2 支付失败 null 未提交支付 0支付成功
logDetails.setCreate_time(new Date());
logDetails.setModify_time(new Date());
if(flag){
subState = "1";
sync_flag = " ,"+payMsg+" = '支付中'";
taskLivingDetailsService.saveLogToSuccess(logDetails);
}else{
subState = "2";
String resMsg = JSONObject.parseObject(attribute).getString("retMsg");
sync_flag = " ,"+payMsg+" = '"+resMsg+"'";
taskLivingDetailsService.saveLogToFail(logDetails);
}
}else{
logDetails.setId(interId);
logDetails.setModify_time(new Date());
if(flag){
subState = "1";
sync_flag = " ,"+payMsg+" = '支付中'";
taskLivingDetailsService.saveLogFailToSuccess(logDetails);
}else{
subState = "2";
String resMsg = JSONObject.parseObject(attribute).getString("retMsg");
sync_flag = " ,"+payMsg+" = '"+resMsg+"'";
taskLivingDetailsService.updateLogFailToSuccess(logDetails);
}
}
str = "update "+tableName+" set " + fieldName + "= '" +subState+"'" +sync_flag+"where id = '"+main.getString("id")+"'";
} catch (Exception e) {
subState = "N";
str = "update "+tableName+" set " + fieldName + "= '" +subState+"'," +payMsg+" = '"+attribute+"' "+"where id = '"+main.getString("id")+"'";
logger.info("保存日志失败"+e.getMessage());
oaBillEntity.setSql(str);
payBillDao.updateStateForId(str,oaBillEntity);
e.printStackTrace();
}
//修改推送状态防止重复推送
oaBillEntity.setSql(str);
payBillDao.updateStateForId(str,oaBillEntity);
}catch (Exception e){
logger.info("宁波银行付款接口调用出错:{}",e);
}
}
}
}
/**
* 查询交易结果
*
* @param hashMaps
* @param apiCode
*/
@Override
public void queryResult(List<HashMap<String, Object>> hashMaps, String apiCode) {
if(CollectionUtils.isNotEmpty(hashMaps)){
PayBillEntity oaBillEntity = new PayBillEntity();
oaBillEntity.setDataSourceCode(oa_data_source_code);
for (HashMap<String, Object> hashMap : hashMaps) {
JSONObject main = new JSONObject();
for(String key:hashMap.keySet()) {
main.put(key, hashMap.get(key));
}
String tableName = main.getString("tableName");
String fieldName = main.getString("fieldName");
String payDate = main.getString("payDate");
String payMsg = main.getString("payMsg");
try {
logger.info("获取到付款单状态的数据"+main.toString());
JSONObject reMain = new JSONObject();
reMain.put("serialNo",main.getString("serialNo"));
String result = this.executeEsb(reMain.toString(),apiCode,"800036");
logger.info("获取付款状态结果"+result);
JSONObject resultObj = JSON.parseObject(result);
JSONObject attribute = resultObj.getJSONObject("attribute");
boolean flag = resultObj.getBoolean("flag");
StringBuffer sb = new StringBuffer();
sb.append("update "+tableName);
if(flag){
JSONObject data = attribute.getJSONObject("Data");
JSONObject transferDtl = new JSONObject();
String status = "";
String msg = "";
boolean isFinally = true;
if ("8000360001".equals(apiCode)){
transferDtl = data.getJSONObject("transferDtl");
status = transferDtl.getString("status");
msg = PayStatusEnum.getByCode(status);
isFinally = PayStatusEnum.isFinally(status);
}else if ("8000360007".equals(apiCode)){
status = data.getString("transState");
msg = TTPayStatusEnum.getByCode(status);
isFinally = TTPayStatusEnum.isFinally(status);
}
if(StrUtil.isEmpty(msg)){
msg ="未知交易状态,请联系管理员查证";
sb.append(" set "+payMsg+" = '"+msg+"'");
sb.append(" , "+fieldName+" = '2'");
}
sb.append(" set "+payMsg+" = '"+msg+"'");
//是否最终态
if(isFinally){
sb.append(" , "+fieldName+" = '0'");
String payDateStr = DateUtil.now();
sb.append(" , "+payDate+" = '"+payDateStr+"'");
}
}else {
sb.append(" set "+payMsg+" = '"+attribute.getString("retMsg")+"'");
sb.append(" ,"+fieldName+" = '2'");
}
sb.append(" where id = '"+main.getString("id")+"'");
//修改推送状态防止重复推送
oaBillEntity.setSql(sb.toString());
payBillDao.updateStateForId(sb.toString(),oaBillEntity);
} catch (Exception e) {
StringBuffer sb = new StringBuffer();
sb.append("update "+tableName );
sb.append(" set "+payMsg+" = '获取交易状态失败'");
sb.append(" , "+fieldName+" = '2'");
sb.append(" where id = '"+main.getString("id")+"'");
logger.info("获取交易状态失败,更新交易信息为失败状态,后续不在查询");
e.printStackTrace();
}
}
}
}
/**
* 调用宁波银行esb接口
*
* @param params
* @param apiCode
* @return
*/
@Override
public String executeEsb(String params, String apiCode,String appId) {
logger.info("请求apiCode:{},参数:{}",apiCode,params);
Map<String, String> header = MapBuilder.<String, String>create(true)
.put("apiCode", apiCode)
.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
//.put("appId","800036")
.put("appId",appId)
.build();
String res = HttpRequest.post("http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(header).body(params).timeout(50000).execute().body();
return res;
}
/**
* 保存收款日志到oa底表
* @param accTransactionResList
*/
@Override
public void saveAccLog(List<AccTransactionRes> accTransactionResList) {
if (CollectionUtils.isNotEmpty(accTransactionResList)){
//查询已经存在的数据
Formmain0044Entity formmain0044 = new Formmain0044Entity();
formmain0044.setStart_date(DateUtil.lastWeek().toDateStr());
formmain0044.setDataSourceCode(oa_data_source_code);
List<Formmain0044Entity> formmain0044List = formmain0044Service.querySeridId(formmain0044);
//过滤已保存的数据
if (CollectionUtils.isNotEmpty(formmain0044List) && CollectionUtils.isNotEmpty(accTransactionResList)){
accTransactionResList = accTransactionResList.stream()
.filter(acc -> formmain0044List.stream()
.noneMatch(f -> acc.getSerialId().equals(f.getField0018())))
.collect(Collectors.toList());
}
if (CollectionUtils.isNotEmpty(accTransactionResList)){
for (AccTransactionRes accTransactionRes : accTransactionResList) {
String bankAcc = StringUtil.nullConvert(accTransactionRes.getBankAcc());
String bankName = StringUtil.nullConvert(accTransactionRes.getBankName());
String accName = StringUtil.nullConvert(accTransactionRes.getAccName());
String oppAccNo = StringUtil.nullConvert(accTransactionRes.getOppAccNo());
String oppAccName = StringUtil.nullConvert(accTransactionRes.getOppAccName());
String oppAccBank = StringUtil.nullConvert(accTransactionRes.getOppAccBank());
String transTime = StringUtil.nullConvert(accTransactionRes.getTransTime());
//这个是唯一的
String serialId = StringUtil.nullConvert(StringUtil.replaceBlank(accTransactionRes.getSerialId()));
String amt = StringUtil.nullConvert(accTransactionRes.getAmt());
String abs = StringUtil.nullConvert(accTransactionRes.getAbs());
String bankType = StringUtil.nullConvert(accTransactionRes.getBankType());
String serialNo = StringUtil.nullConvert(accTransactionRes.getSerialNo());
String currency = StringUtil.nullConvert(CurrencyEnum.getNameByCode(accTransactionRes.getCurCode()));
String uses = StringUtil.nullConvert(accTransactionRes.getUses());
//String curCode = StringUtil.nullConvert(accTransactionRes.getCurCode());
//这里转换成货币符号
String curCode = StringUtil.nullConvert(CurrencyEnum.getSymbolByCode(accTransactionRes.getCurCode()));
String postScript = StringUtil.nullConvert(accTransactionRes.getPostScript());
String data = StrUtil.format(getAccLogXmlTemplate(),bankAcc,bankName,accName,oppAccNo,oppAccName,oppAccBank,transTime,serialId,amt,abs,bankType,serialNo,currency,uses,postScript,curCode);
JSONObject paramsTemplate = new JSONObject();
paramsTemplate.put("loginName", "oa1");
paramsTemplate.put("dataXml", data);
Map<String, String> header = MapBuilder.<String, String>create(true)
.put("apiCode", "8000340006")
.put("publicKey","ZJYAA9Z/jWMe1rC+Sjh8NVMRtwVMb5Bn0DbmIEsgpVlR3C9Ce7eDIk+3zDUT+v578prj")
.put("secretKey","B8sgQwEaskwM7BQj1XLvu3kdKD3xm7Lyd4FWsPaFQk5v+UtQLCkzVzLlCZ9Bdyv2j3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
.put("appId","800034")
.build();
String res = HttpRequest.post("http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(header).body(paramsTemplate.toString()).timeout(60000).execute().body();
System.out.println("保存oa底表结果:"+res);
}
}
}
}
/**
* 查询OA附件并上传到宁波银行
*
* @param oaId oa主键id
* @return 宁波银行附件上传编码
*/
@Override
public String fileUpload(String oaId) {
if (StrUtil.isNotEmpty(oaId)){
try {
//查询oa单据关联附件
PayBillEntity oaBillEntity = new PayBillEntity();
oaBillEntity.setDataSourceCode(oa_data_source_code);
String sql = " SELECT\n" +
" formmain_0058.id,\n" +
" formmain_0058.field0024 ,\n" +
" CTP_ATTACHMENT.FILE_URL,\n" +
" CTP_ATTACHMENT.FILENAME\n" +
"FROM\n" +
" formmain_0058 \n" +
" LEFT JOIN CTP_ATTACHMENT ON CTP_ATTACHMENT.SUB_REFERENCE = formmain_0058.field0024 \n" +
"WHERE\n" +
" formmain_0058.field0061 = '境外'\n" +
" and formmain_0058.id = '" + oaId+"'";
oaBillEntity.setSql(sql);
List<HashMap<String, Object>> dataList = payBillDao.getOaBillData(sql, oaBillEntity);
if (CollectionUtils.isNotEmpty(dataList)){
HashMap<String, Object> oaDataMap = dataList.get(0);
String fileUrl = String.valueOf(oaDataMap.get("FILE_URL"));
String fileName = String.valueOf(oaDataMap.get("FILENAME"));
if (StrUtil.isNotEmpty(fileUrl)){
//下载OA附件
byte[] bytes = restUtil.downloadFileBytes("oa1", "8000340000", fileUrl, fileName);
//上传到宁波银行
logger.info("上传附件到宁波银行:{},{}",fileUrl,fileName);
JSONObject param = new JSONObject();
param.put("fileName",fileName);
param.put("bytes",bytes);
param.put("channelNo","open-filegateway");
String res = executeEsb(param.toString(), "8000360008","800036");
JsonResultEntity jsonResultEntity = JSONObject.parseObject(res, JsonResultEntity.class);
if (null != jsonResultEntity && jsonResultEntity.isFlag()){
JSONObject attribute = JSONObject.parseObject(String.valueOf(jsonResultEntity.getAttribute()));
JSONObject data = attribute.getJSONObject("Data");
String fileCode = data.getString("data");
return fileCode;
}
}
}
}catch(Exception e){
logger.error("上传附件到宁波银行出错:{}",e);
}
}
return null;
}
/**
* 更新u8c单据状态
* @param main
*/
@Override
public void updateU8CStatus(JSONObject main,String integration_task_living_details_id) {
String billCode = main.getString("serialNo");
String dwbm = main.getString("dwbm");
String state = main.getString("state");
String userCode = main.getString("userCode");
String id = main.getString("id");
if (StrUtil.isNotEmpty(billCode)){
PayBillEntity oaBillEntity = new PayBillEntity();
oaBillEntity.setDataSourceCode(oa_data_source_code);
String str = "update formmain_0058 set field0072 = 'N' where id = "+id;
try {
JSONObject param = new JSONObject();
param.put("billno",billCode);
param.put("corpcode",dwbm);
param.put("billType","paybill");
param.put("userCode",userCode);
param.put("ckeckResult","3".equals(state) ? "Y" :"N");
param.put("ckeckNote",getStateName(state));
String result = executeEsb(param.toString(), "8000350060","800035");
logger.info("调用U8C付款单审批返回参数:{}",result);
//保存日志
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
taskLivingDetail.setCreate_time(new Date());
taskLivingDetail.setModify_time(new Date());
taskLivingDetail.setRootAppPk(id);
taskLivingDetail.setRootAppBill(main.getString("serialNo"));
taskLivingDetail.setPluginId("PayReqSyncU8CPlugin");
taskLivingDetail.setRootAppNewData(param.toString());
taskLivingDetail.setNewTransmitInfo(result);
taskLivingDetail.setNewPushDate(new Date());
JSONObject resultObj = JSON.parseObject(result);
boolean flag = resultObj.getBoolean("flag");
//保存日志
saveLog(integration_task_living_details_id,flag,taskLivingDetail);
//更新oa表单推送状态
if (flag){
str = "update formmain_0058 set field0072 = 'Y' where id = "+id;
}
}catch (Exception e){
logger.error("执行U8C付款单审批接口出错:{}",e);
}
//修改推送状态防止重复推送
oaBillEntity.setSql(str);
try {
payBillDao.updateStateForId(str,oaBillEntity);
} catch (Exception e) {
logger.error("执行U8C付款单审批接口后更新OA单据状态出错:{}",e);
}
}
}
//审批状态对应的中文
private String getStateName(String state){
if ("3".equals(state)){
return "审批通过";
}else if ("1".equals(state)){
return "流程终止";
}else if ("2".equals(state)){
return "流程撤销";
}
return "审批通过";
}
public void saveLog(String integration_task_living_details_id, Boolean flag, IntegrationTaskLivingDetailsEntity taskLivingDetail){
try {
//判断成功调用这个方法
if (StrUtil.isEmpty(integration_task_living_details_id)){
if (flag){
taskLivingDetailsService.saveLogToSuccess(taskLivingDetail);
}else {
//失败 调用这个方法
taskLivingDetailsService.saveLogToFail(taskLivingDetail);
}
}else {
taskLivingDetail.setId(integration_task_living_details_id);
if (flag){
//如果是重试 成功调这个方法
taskLivingDetailsService.saveLogFailToSuccess(taskLivingDetail);
}else {
//如果是重试 失败调这个方法
taskLivingDetailsService.updateLogFailToSuccess(taskLivingDetail);
}
}
}catch (Exception e){
logger.error("保存日志出错:{}",e);
}
}
private static String getAccLogXmlTemplate(){
// return "<forms version=\"2.1\"><formExport><summary id=\"1828182906863371818\" name=\"formmain_0044\"/><definitions><column id=\"field0001\" type=\"0\" name=\"我方账号\" isNullable=\"false\" length=\"200\"/><column id=\"field0017\" type=\"0\" name=\"我方开户行\" isNullable=\"false\" length=\"200\"/><column id=\"field0024\" type=\"0\" name=\"我方户名\" isNullable=\"false\" length=\"200\"/><column id=\"field0029\" type=\"0\" name=\"客户方账号\" isNullable=\"false\" length=\"200\"/><column id=\"field0022\" type=\"0\" name=\"客户方户名\" isNullable=\"false\" length=\"2000\"/><column id=\"field0030\" type=\"0\" name=\"客户方开户行\" isNullable=\"false\" length=\"500\"/><column id=\"field0018\" type=\"2\" name=\"交易日期\" isNullable=\"false\" length=\"255\"/><column id=\"field0019\" type=\"0\" name=\"交易流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0020\" type=\"4\" name=\"收款金额\" isNullable=\"false\" length=\"20\"/><column id=\"field0021\" type=\"0\" name=\"摘要\" isNullable=\"false\" length=\"500\"/><column id=\"field0025\" type=\"0\" name=\"银行类型\" isNullable=\"false\" length=\"100\"/><column id=\"field0026\" type=\"0\" name=\"银行流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0027\" type=\"0\" name=\"币种\" isNullable=\"false\" length=\"100\"/><column id=\"field0028\" type=\"0\" name=\"用途\" isNullable=\"false\" length=\"800\"/><column id=\"field0031\" type=\"0\" name=\"关联客户号\" isNullable=\"false\" length=\"100\"/><column id=\"field0032\" type=\"0\" name=\"客商编号\" isNullable=\"false\" length=\"100\"/><column id=\"field0033\" type=\"0\" name=\"交易代码\" isNullable=\"false\" length=\"100\"/><column id=\"field0034\" type=\"0\" name=\"客商名称\" isNullable=\"false\" length=\"100\"/><column id=\"field0035\" type=\"0\" name=\"对账码\" isNullable=\"false\" length=\"100\"/><column id=\"field0036\" type=\"0\" name=\"备注\" isNullable=\"false\" length=\"800\"/><column id=\"field0037\" type=\"0\" name=\"ERP业务参考号\" isNullable=\"false\" length=\"100\"/><column id=\"field0038\" type=\"0\" name=\"币种ID\" isNullable=\"false\" length=\"100\"/><column id=\"field0039\" type=\"0\" name=\"币种编码\" isNullable=\"false\" length=\"100\"/><column id=\"field0040\" type=\"0\" name=\"控制只关联1次\" isNullable=\"false\" length=\"100\"/><column id=\"field0044\" type=\"4\" name=\"收款剩余金额\" isNullable=\"false\" length=\"20\"/><column id=\"field0045\" type=\"0\" name=\"收款完成情况\" isNullable=\"false\" length=\"100\"/><column id=\"field0046\" type=\"4\" name=\"是否收款完成\" isNullable=\"false\" length=\"20\"/></definitions><values><column name=\"我方账号\"><value><![CDATA[{}]]></value></column><column name=\"我方开户行\"><value><![CDATA[{}]]></value></column><column name=\"我方户名\"><value><![CDATA[{}]]></value></column><column name=\"客户方账号\"><value><![CDATA[{}]]></value></column><column name=\"客户方户名\"><value><![CDATA[{}]]></value></column><column name=\"客户方开户行\"><value><![CDATA[{}]]></value></column><column name=\"交易日期\"><value><![CDATA[{}]]></value></column><column name=\"交易流水号\"><value><![CDATA[{}]]></value></column><column name=\"收款金额\"><value><![CDATA[{}]]></value></column><column name=\"摘要\"><value><![CDATA[{}]]></value></column><column name=\"银行类型\"><value><![CDATA[{}]]></value></column><column name=\"银行流水号\"><value><![CDATA[{}]]></value></column><column name=\"币种\"><value><![CDATA[{}]]></value></column><column name=\"用途\"><value><![CDATA[{}]]></value></column><column name=\"关联客户号\"><value><![CDATA[{}]]></value></column><column name=\"客商编号\"><value><![CDATA[{}]]></value></column><column name=\"交易代码\"><value><![CDATA[{}]]></value></column><column name=\"客商名称\"><value><![CDATA[{}]]></value></column><column name=\"对账码\"><value><![CDATA[{}]]></value></column><column name=\"备注\"><value><![CDATA[{}]]></value></column><column name=\"ERP业务参考号\"><value><![CDATA[{}]]></value></column><column name=\"币种ID\"><value><![CDATA[{}]]></value></column><column name=\"币种编码\"><value><![CDATA[{}]]></value></column><column name=\"控制只关联1次\"><value><![CDATA[{}]]></value></column><column name=\"收款剩余金额\"><value><![CDATA[{}]]></value></column><column name=\"收款完成情况\"><value><![CDATA[{}]]></value></column><column name=\"是否收款完成\"><value><![CDATA[{}]]></value></column></values><subForms/></formExport></forms>";
return "<forms version=\"2.1\"><formExport><summary id=\"1828182906863371818\" name=\"formmain_0044\"/><definitions><column id=\"field0001\" type=\"0\" name=\"我方账号\" isNullable=\"false\" length=\"200\"/><column id=\"field0017\" type=\"0\" name=\"我方开户行\" isNullable=\"false\" length=\"200\"/><column id=\"field0024\" type=\"0\" name=\"我方户名\" isNullable=\"false\" length=\"200\"/><column id=\"field0029\" type=\"0\" name=\"客户方账号\" isNullable=\"false\" length=\"200\"/><column id=\"field0022\" type=\"0\" name=\"客户方户名\" isNullable=\"false\" length=\"2000\"/><column id=\"field0030\" type=\"0\" name=\"客户方开户行\" isNullable=\"false\" length=\"500\"/><column id=\"field0018\" type=\"2\" name=\"交易日期\" isNullable=\"false\" length=\"255\"/><column id=\"field0019\" type=\"0\" name=\"交易流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0020\" type=\"4\" name=\"收款金额\" isNullable=\"false\" length=\"20\"/><column id=\"field0021\" type=\"0\" name=\"摘要\" isNullable=\"false\" length=\"500\"/><column id=\"field0025\" type=\"0\" name=\"银行类型\" isNullable=\"false\" length=\"100\"/><column id=\"field0026\" type=\"0\" name=\"银行流水号\" isNullable=\"false\" length=\"100\"/><column id=\"field0027\" type=\"0\" name=\"币种\" isNullable=\"false\" length=\"100\"/><column id=\"field0028\" type=\"0\" name=\"用途\" isNullable=\"false\" length=\"800\"/><column id=\"field0036\" type=\"0\" name=\"备注\" isNullable=\"false\" length=\"800\"/><column id=\"field0039\" type=\"0\" name=\"币种编码\" isNullable=\"false\" length=\"100\"/></definitions><values><column name=\"我方账号\"><value><![CDATA[{}]]></value></column><column name=\"我方开户行\"><value><![CDATA[{}]]></value></column><column name=\"我方户名\"><value><![CDATA[{}]]></value></column><column name=\"客户方账号\"><value><![CDATA[{}]]></value></column><column name=\"客户方户名\"><value><![CDATA[{}]]></value></column><column name=\"客户方开户行\"><value><![CDATA[{}]]></value></column><column name=\"交易日期\"><value><![CDATA[{}]]></value></column><column name=\"交易流水号\"><value><![CDATA[{}]]></value></column><column name=\"收款金额\"><value><![CDATA[{}]]></value></column><column name=\"摘要\"><value><![CDATA[{}]]></value></column><column name=\"银行类型\"><value><![CDATA[{}]]></value></column><column name=\"银行流水号\"><value><![CDATA[{}]]></value></column><column name=\"币种\"><value><![CDATA[{}]]></value></column><column name=\"用途\"><value><![CDATA[{}]]></value></column><column name=\"备注\"><value><![CDATA[{}]]></value></column><column name=\"币种编码\"><value><![CDATA[{}]]></value></column></values><subForms/></formExport></forms>";
}
}

View File

@ -0,0 +1,93 @@
package com.hzya.frame.plugin.kjs.listener;
import com.alibaba.fastjson.JSONObject;
import com.dingtalk.open.app.api.GenericEventListener;
import com.dingtalk.open.app.api.OpenDingTalkStreamClientBuilder;
import com.dingtalk.open.app.api.message.GenericOpenDingTalkEvent;
import com.dingtalk.open.app.api.security.AuthClientCredential;
import com.dingtalk.open.app.stream.protocol.event.EventAckStatus;
import com.hzya.frame.dingtalk.service.IDingTalkExtService;
import com.hzya.frame.plugin.kjs.service.GenericEventConsumer;
import com.hzya.frame.sysnew.application.dao.ISysApplicationDao;
import com.hzya.frame.sysnew.application.entity.SysApplicationEntity;
import com.hzya.frame.sysnew.application.service.ISysApplicationService;
import com.hzya.frame.sysnew.application.service.impl.ApplicationCache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.DependsOn;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.Resource;
/**
* @Description 钉钉通讯录事件订阅
* @Author xiangerlin
* @Date 2024/8/27 14:43
**/
@Component
public class GenericEventSubscribe {
Logger logger = LoggerFactory.getLogger(getClass());
@Resource
private GenericEventConsumer genericEventConsumer;
@Resource
private TaskExecutor taskExecutor;
@Resource
private ApplicationCache applicationCache;
@Resource
private IDingTalkExtService dingTalkExtService;
@Resource
private ISysApplicationDao sysApplicationDao;
@PostConstruct
public void init() {
//查询钉钉配置的参数
SysApplicationEntity sysApp = new SysApplicationEntity();
sysApp.setAppId(800005);
sysApp = sysApplicationDao.queryOne(sysApp);
if (null != sysApp){
JSONObject dingTalkConfig = dingTalkExtService.getDingTalkConfig(sysApp);
if (null != dingTalkConfig){
String appKey = dingTalkConfig.getString("appKey");
String appSecret = dingTalkConfig.getString("appSecret");
subscribe(appKey,appSecret);
}
}
}
/**
* 通讯录事件订阅
*/
public void subscribe(String appKey,String appSecret){
try {
logger.info("通讯录事件订阅");
OpenDingTalkStreamClientBuilder
.custom()
.credential(new AuthClientCredential(appKey, appSecret))
//注册事件监听
.registerAllEventListener(new GenericEventListener() {
public EventAckStatus onEvent(GenericOpenDingTalkEvent event) {
try {
try {
//处理事件
taskExecutor.execute(()->{
genericEventConsumer.consume(event);
});
}catch (Exception e){
logger.error("GenericEventThreadPool错误{}",e);
}
//消费成功
return EventAckStatus.SUCCESS;
} catch (Exception e) {
//消费失败
return EventAckStatus.LATER;
}
}
})
.build().start();
}catch (Exception e){
e.printStackTrace();
logger.error("通讯录事件订阅出错:{}",e);
}
}
}

View File

@ -0,0 +1,102 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.kjs.service.IDeliveryOrderPluginService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description
* @Author xiangerlin
* @Date 2024/8/22 16:39
**/
public class DeliveryOrderPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IDeliveryOrderPluginService deliveryOrderPluginService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "kjsDeliveryOrderPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "kjs发货单同步WMS插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "kjs发货单同步WMS插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
logger.info("开始执行"+getPluginName()+requestJson.toString());
String res = deliveryOrderPluginService.sync2wms(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,99 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.kjs.service.IDingTalkBuService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
public class DingAttendancePluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IDingTalkBuService dingTalkBuService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "kjsDingAttendancePlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "kjs钉钉考勤数据插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "kjs钉钉考勤数据插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
logger.info("开始执行"+getPluginName()+requestJson.toString());
String res = dingTalkBuService.getAttendanceList(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,111 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.kjs.service.IDingTalkInitService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description 钉钉组织架构初始化
* @Author xiangerlin
* @Date 2024/9/2 16:19
**/
public class DingTalkInitPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IDingTalkInitService dingTalkService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "kjsDingTalkInitPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "kjs钉钉部门人员初始化插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "kjs钉钉部门人员初始化插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
logger.info("开始执行"+getPluginName()+requestJson.toString());
new Thread(()->{
String type = requestJson.getString("type");
Long deptId = requestJson.getLong("deptId");
if ("dept".equals(type)){
dingTalkService.deptInit(deptId);
}else if ("user".equals(type)){
dingTalkService.userInit(deptId);
}
}).start();
return BaseResult.getSuccessMessageEntity("成功");
}
}

View File

@ -0,0 +1,102 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.Jackyun.goodsdocin.service.IGoodsdocInService;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description
* @Author xiangerlin
* @Date 2024/8/22 16:39
**/
public class JeckYunGoodsdocInBakPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IGoodsdocInService goodsdocInService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "JeckYunGoodsdocInBakPluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "吉客云入库单同步WMS插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "吉客云入库单同步WMS插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
logger.info("开始执行"+getPluginName()+requestJson.toString());
goodsdocInService.getJeckGoodsdocInBak(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,103 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.Jackyun.goodsdocin.service.IGoodsdocInService;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.kjs.service.IDeliveryOrderPluginService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description
* @Author xiangerlin
* @Date 2024/8/22 16:39
**/
public class JeckYunGoodsdocInPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IGoodsdocInService goodsdocInService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "JeckYunGoodsdocInPluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "吉客云入库单同步WMS插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "吉客云入库单同步WMS插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
logger.info("开始执行"+getPluginName()+requestJson.toString());
goodsdocInService.getJeckGoodsdocIn(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,102 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.Jackyun.goodsdocin.service.IGoodsdocInService;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description
* @Author xiangerlin
* @Date 2024/8/22 16:39
**/
public class JeckYunGoodsdocInToU8PluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IGoodsdocInService goodsdocInService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "JeckYunGoodsdocInToU8PluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "吉客云入库单同步WMS插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "吉客云入库单同步WMS插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
logger.info("开始执行"+getPluginName()+requestJson.toString());
goodsdocInService.getJeckGoodsdocInToU8(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,102 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.Jackyun.goodsdocout.service.IGoodsdocOutService;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description
* @Author xiangerlin
* @Date 2024/8/22 16:39
**/
public class JeckYunGoodsdocOutBakPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IGoodsdocOutService IGoodsdocOutService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "JeckYunGoodsdocOutBakPluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "吉客云出库单同步WMS插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "吉客云出库单同步WMS插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
logger.info("开始执行"+getPluginName()+requestJson.toString());
IGoodsdocOutService.jeckYunGoodsdocOutBak( requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,103 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.Jackyun.goodsdocout.service.IGoodsdocOutService;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.kjs.service.IDeliveryOrderPluginService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description
* @Author xiangerlin
* @Date 2024/8/22 16:39
**/
public class JeckYunGoodsdocOutPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IGoodsdocOutService IGoodsdocOutService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "JeckYunGoodsdocOutPluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "吉客云出库单同步WMS插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "吉客云出库单同步WMS插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
logger.info("开始执行"+getPluginName()+requestJson.toString());
IGoodsdocOutService.getjRckYunGoodsdocOut(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,103 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.kjs.service.IMomOrderPluginService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @Description u8生产订单同步wms
* @Author xiangerlin
* @Date 2024/8/23 09:17
**/
public class MomOrderPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IMomOrderPluginService momOrderPluginService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "kjsMomOrderPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "kjs生产订单同步WMS插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "kjs生产订单同步WMS插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
logger.info("开始执行"+getPluginName()+requestJson.toString());
momOrderPluginService.sync2wms(requestJson);
return BaseResult.getSuccessMessageEntity("执行成功");
}
}

View File

@ -0,0 +1,105 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.u8.otherin.service.IOtherInService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
*
* @content 其他入库单同步CRM
* @className: Administrator
* @author laborer
* @date 2024-10-18 8:46
*
*/
public class OtherInPluginInitializer extends PluginBaseEntity {
@Autowired
private IOtherInService otherInService;
Logger logger = LoggerFactory.getLogger(getClass());
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "OtherInPluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "其他入库单同步CRM";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "其他入库单同步CRM";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
otherInService.getU8OtherInToCrm(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,105 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.u8.otherout.service.IOtherOutService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
*
* @content 其他出库单同步CRM
* @className: Administrator
* @author laborer
* @date 2024-10-18 8:46
*
*/
public class OtherOutPluginInitializer extends PluginBaseEntity {
@Autowired
private IOtherOutService otherOutService;
Logger logger = LoggerFactory.getLogger(getClass());
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "OtherOutPluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "其他出库单同步CRM";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "其他出库单同步CRM";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
otherOutService.getU8OtherOutToCrm(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,105 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.u8.otherreceipt.service.IOtherReceiptService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
*
* @content 其他应收单
* @className: Administrator
* @author laborer
* @date 2024-10-18 8:46
*
*/
public class OtherReceiptPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IOtherReceiptService otherReceiptService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "OtherReceiptPluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "其他应收单同步CRM插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "其他应收单同步CRM插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
otherReceiptService.getU8otherReceiptToCrm(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,105 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.u8.receipt.service.IReceiptService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
*
* @content 收款单同步CRM插件
* @className: Administrator
* @author laborer
* @date 2024-10-18 8:46
*
*/
public class ReceiptPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IReceiptService receiptService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "ReceiptPluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "收款单同步CRM插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "收款单同步CRM插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
receiptService.getU8ReceiptCrm(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,105 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.u8.saleinv.service.ISaleInvService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
*
* @content 销售发票同步CRM
* @className: Administrator
* @author laborer
* @date 2024-10-18 8:46
*
*/
public class SaleInvPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private ISaleInvService saleInvService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "SaleInvPluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "销售发票同步CRM";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "销售发票同步CRM";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
saleInvService.getU8SaleInvToCrm(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,106 @@
package com.hzya.frame.plugin.kjs.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.kjs.service.IDeliveryOrderPluginService;
import com.hzya.frame.u8.saleout.service.ISaleOutService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
*
* @content 销售发货单同步CRM插件
* @className: Administrator
* @author laborer
* @date 2024-10-18 8:46
*
*/
public class SaleOutPluginInitializer extends PluginBaseEntity {
@Autowired
private ISaleOutService saleOutService;
Logger logger = LoggerFactory.getLogger(getClass());
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "SaleOutPluginInitializer";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "销售发货单同步CRM插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "销售发货单同步CRM插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
saleOutService.getU8SaleOutToCrm(requestJson);
return BaseResult.getSuccessMessageEntity("操作成功");
}
}

View File

@ -0,0 +1,318 @@
package com.hzya.frame.plugin.kjs.service;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.dingtalk.api.response.OapiV2DepartmentGetResponse;
import com.dingtalk.api.response.OapiV2UserGetResponse;
import com.dingtalk.open.app.api.message.GenericOpenDingTalkEvent;
import com.hzya.frame.dingtalk.enums.OrgEventEnum;
import com.hzya.frame.dingtalk.service.IDingTalkService;
import com.hzya.frame.sysnew.comparison.service.impl.ComparisonServiceImpl;
import com.hzya.frame.uuid.UUIDUtils;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import shade.com.alibaba.fastjson2.JSONArray;
import shade.com.alibaba.fastjson2.JSONObject;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Description 通讯录事件订阅消费者
* @Author xiangerlin
* @Date 2024/8/27 15:33
**/
public class GenericEventConsumer {
@Autowired
private ComparisonServiceImpl comparisonServiceimpl;
Logger logger = LoggerFactory.getLogger(getClass());
//中台应用
public static final String APPCODE = "800004";
public static final String URL = "http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface";
//中台 publicKey
public static final String PUBLICKEY = "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj";
//中台secretKey
public static final String SECRETKEY = "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=";
//mdm通用新增接口编码
public static final String MDMADDCODE = "8000040022";
//mdm通用删除接口编码
public static final String MDMREMOVECODE = "8000040024";
//主数据人员钉钉档案编码
public static final String DDUSERMDMCODE = "10015";
//主数据钉钉部门档案编码
public static final String DDDEPTMDMCODE = "10016";
//钉钉应用编码
public static final String DDAPPCODE = "800005";
//钉钉 publicKey
public static final String DDPUBLICKEY = "ZJYAn/EBWEhLUMezDLU4iZ1vTO9kc6pM6XrYLajnqnK60Q9Ce7eDIk+3zDUT+v578prj";
//钉钉secretKey
public static final String DDSECRETKEY = "ctMIYyauwoKSFeU4tg5gH1aWC/3OJK6HsKJrSR0oyDmdmdvRNgdoTzX0C1OQ+whrj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=";
//获取钉钉用户详情接口编码
public static final String GETUSERAPPCODE="8000050001";
//获取钉钉部门详情接口编码
public static final String GETDETPAPPCODE="8000050002";
//user锁对象
static final Object userLockObj = new Object();
//dept部门锁
static final Object deptLockObj = new Object();
/**
* 消费通讯录事件订阅消息
*
* @param event
*/
public void consume(GenericOpenDingTalkEvent event) {
//事件唯一Id
String eventId = event.getEventId();
//事件类型
String eventType = event.getEventType();
//事件产生时间
Long bornTime = event.getEventBornTime();
//获取事件体
JSONObject bizData = event.getData();
logger.info("事件唯一id{},事件类型:{},参数:{}",eventId,eventType,JSONObject.toJSONString(bizData));
OrgEventEnum orgEventEnum = OrgEventEnum.getByCode(eventType);
String apiCode = MDMADDCODE;
String type = "user";
boolean flag = false;
switch (orgEventEnum){
//新增到主数据
case USER_ADD_ORG:
case USER_LEAVE_ORG:
case USER_MODIFY_ORG:
flag = true;
break;
case ORG_DEPT_CREATE:
case ORG_DEPT_MODIFY:
type = "dept";
flag = true;
break;
case ORG_DEPT_REMOVE:
type = "dept";
apiCode = MDMREMOVECODE;
flag = true;
break;
}
if (flag){
if ("user".equals(type)){
synchronized (userLockObj) {
JSONArray userIds = bizData.getJSONArray("userId");
//调用钉钉查询用户详情接口
for (int i=0; i<userIds.size();i++){
try {
if(!eventType.equals("user_leave_org")){
//获取用户详情
String userRes = getUserById(String.valueOf(userIds.get(i)));
//保存钉钉用户到mdm
String userMdmRes = createUser(userRes,eventType);
}else {
String userId = (String) userIds.get(i);
com.alibaba.fastjson.JSONObject jsonStr = new com.alibaba.fastjson.JSONObject();
com.alibaba.fastjson.JSONObject mdmUser = new com.alibaba.fastjson.JSONObject();
jsonStr.put("mdmCode","10015");
jsonStr.put("optionName","admin");
mdmUser.put("data_id",userId);
mdmUser.put("event_type","user_leave_org");
jsonStr.put("mdm_dd_user",mdmUser);
Object result = comparisonServiceimpl.updateEntity(jsonStr);
logger.info("更新结果为:{}", JSON.toJSONString(result));
//根据userid更新mdm档案
}
}catch (Exception ex ){
logger.error("钉钉用户保存到主数据报错:{}",ex);
}
}
}
}else if ("dept".equals(type)){
synchronized (deptLockObj){
try {
JSONArray deptIdArr = bizData.getJSONArray("deptId");
for (int i=0; i<deptIdArr.size(); i++){
if(!eventType.equals("org_dept_remove")){
//查询部门详情
String deptRes = getDeptById(deptIdArr.getLong(i));
//保存部门到mdm
String deptMdmRes = createDept(deptRes,apiCode);
}else{
String deptId = String.valueOf(deptIdArr.getLong(i));
com.alibaba.fastjson.JSONObject jsonStr = new com.alibaba.fastjson.JSONObject();
com.alibaba.fastjson.JSONObject mdmUser = new com.alibaba.fastjson.JSONObject();
jsonStr.put("mdmCode","10016");
jsonStr.put("optionName","admin");
mdmUser.put("data_id",deptId);
jsonStr.put("mdm_dd_dept",mdmUser);
Object result = comparisonServiceimpl.deleteEntity(jsonStr);
logger.info("更新结果为:{}", JSON.toJSONString(result));
}
}
}catch (Exception e){
logger.error("钉钉部门保存到主数据报错:{}",e);
}
}
}
}
}
/**
* 查询钉钉用户详情
* @param userid
* @return
*/
private static String getUserById(String userid) {
Map<String, String> userHeaderMap = MapBuilder.<String, String>create(true)
.put("apiCode", GETUSERAPPCODE)//钉钉接口
.put("publicKey",PUBLICKEY)//中台应用
.put("secretKey",SECRETKEY)//中台应用
.put("appId",DDAPPCODE)//钉钉接口
.build();
Map<String,Object> userParam = new HashMap<>();
userParam.put("userid", userid);
userParam.put("language","zh_CN");
String userRes = HttpRequest.post(URL).addHeaders(userHeaderMap).body(com.alibaba.fastjson.JSONObject.toJSONString(userParam)).timeout(60000).execute().body();
return userRes;
}
/**
* 查询钉钉部门详情
* @param deptId
* @return
*/
private String getDeptById(Long deptId) {
Map<String, String> userHeaderMap = MapBuilder.<String, String>create(true)
.put("apiCode", GETDETPAPPCODE)//钉钉接口
.put("publicKey",PUBLICKEY)//中台应用
.put("secretKey",SECRETKEY)//中台应用
.put("appId",DDAPPCODE)//钉钉接口
.build();
Map<String,Object> deptParam = new LinkedHashMap<>();
deptParam.put("dept_id",deptId);
deptParam.put("language","zh_CN");
String deptRes = HttpRequest.post(URL).addHeaders(userHeaderMap).body(com.alibaba.fastjson.JSONObject.toJSONString(deptParam)).timeout(60000).execute().body();
return deptRes;
}
//保存用户到mdm
private String createUser(String userRes,String eventType) {
JsonResultEntity jsonResult = JSONObject.parseObject(userRes,JsonResultEntity.class);
if (jsonResult.isFlag()){
shade.com.alibaba.fastjson2.JSONObject attribute = (shade.com.alibaba.fastjson2.JSONObject) jsonResult.getAttribute();
String attrStr = attribute.toString();
OapiV2UserGetResponse rsp = JSONObject.parseObject(attrStr, OapiV2UserGetResponse.class);
if (rsp.isSuccess()){
String result = attribute.getString("result");
OapiV2UserGetResponse.UserGetResponse userInfo = com.alibaba.fastjson.JSONObject.parseObject(result,OapiV2UserGetResponse.UserGetResponse.class);
//OapiV2UserGetResponse.UserGetResponse userInfo = dingtalkService.getUserById(userIds.getString(i));
createMdmUser(eventType, userInfo);
// return body;
}
}
return null;
}
public void createMdmUser(String eventType, OapiV2UserGetResponse.UserGetResponse userInfo) {
Map<String,Object> mdmMap = new LinkedHashMap<>();
mdmMap.put("mdmCode",DDUSERMDMCODE);
mdmMap.put("optionName","系统管理员");
Map<String,Object> userMap = new LinkedHashMap<>();
userMap.put("data_id", userInfo.getUserid());
userMap.put("unionid", userInfo.getUnionid());
userMap.put("userid", userInfo.getUserid());
userMap.put("name", userInfo.getName());
userMap.put("mobile", userInfo.getMobile());
userMap.put("job_number", userInfo.getJobNumber());
userMap.put("title", userInfo.getTitle());
userMap.put("email", userInfo.getEmail());
userMap.put("org_email", userInfo.getOrgEmail());
userMap.put("event_type", eventType);
userMap.put("dept_id_list", userInfo.getDeptIdList());
if (null != userInfo.getHiredDate()){
userMap.put("hired_date", DateUtil.format(DateUtil.date(userInfo.getHiredDate()),"yyyy-MM-dd"));
}
List<Map<String,Object>> postList = new LinkedList<>();
//处理职位信息
List<OapiV2UserGetResponse.DeptPosition> deptPositionList = userInfo.getDeptPositionList();
if (CollectionUtils.isNotEmpty(deptPositionList) && deptPositionList.size()>1){
//用stream方式给deptOrderList排序排序字段为order
List<OapiV2UserGetResponse.DeptOrder> deptOrderList = userInfo.getDeptOrderList();
// 使用Stream API对deptOrderList按order字段排序
List<OapiV2UserGetResponse.DeptOrder> sortedDeptOrderList = deptOrderList.stream()
.sorted(Comparator.comparing(OapiV2UserGetResponse.DeptOrder::getOrder))
.collect(Collectors.toList());
for (OapiV2UserGetResponse.DeptOrder deptOrder : sortedDeptOrderList) {
for (OapiV2UserGetResponse.DeptPosition deptPosition : deptPositionList) {
if (deptPosition.getDeptId().equals(deptOrder.getDeptId())){
Map<String,Object> positionMap = new LinkedHashMap<>();
positionMap.put("dept_id",deptPosition.getDeptId());
positionMap.put("title",deptPosition.getTitle());
positionMap.put("data_id", UUIDUtils.getUUID());
postList.add(positionMap);
break;
}
}
}
}else if (CollectionUtils.isNotEmpty(deptPositionList) && deptPositionList.size() == 1){
OapiV2UserGetResponse.DeptPosition deptPosition = deptPositionList.get(0);
Map<String,Object> positionMap = new LinkedHashMap<>();
positionMap.put("dept_id",deptPosition.getDeptId());
positionMap.put("title",StrUtil.isEmpty(deptPosition.getTitle()) ? userInfo.getTitle():deptPosition.getTitle());
positionMap.put("data_id", UUIDUtils.getUUID());
postList.add(positionMap);
}
mdmMap.put("mdm_dd_user",userMap);
mdmMap.put("mdm_dd_user_position",postList);
//保存到人员主数据
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
.put("apiCode", MDMADDCODE)//中台接口
.put("publicKey",DDPUBLICKEY)//钉钉应用
.put("secretKey",DDSECRETKEY)//钉钉应用
.put("appId",APPCODE)//中台应用
.build();
String body = HttpRequest.post(URL).addHeaders(headerMap).body(com.alibaba.fastjson.JSONObject.toJSONString(mdmMap)).timeout(60000).execute().body();
}
/**
* 保存部门到mdm
* @param deptRes
* @return
*/
private String createDept(String deptRes,String apiCode) {
if (StrUtil.isNotEmpty(deptRes) && StrUtil.isNotEmpty(apiCode)){
JsonResultEntity jsonResult = JSONObject.parseObject(deptRes,JsonResultEntity.class);
if (jsonResult.isFlag()){
shade.com.alibaba.fastjson2.JSONObject attribute = (shade.com.alibaba.fastjson2.JSONObject) jsonResult.getAttribute();
String result = attribute.getString("result");
OapiV2DepartmentGetResponse.DeptGetResponse deptInfo = com.alibaba.fastjson.JSONObject.parseObject(result,OapiV2DepartmentGetResponse.DeptGetResponse.class);
//OapiV2DepartmentGetResponse.DeptGetResponse deptInfo = dingtalkService.getDeptById(deptIdArr.getLong(i));
Map<String,Object> mdmMap = new LinkedHashMap<>();
mdmMap.put("mdmCode",DDDEPTMDMCODE);
mdmMap.put("optionName","系统管理员");
Map<String,Object> deptMap = new LinkedHashMap<>();
deptMap.put("dept_id",deptInfo.getDeptId());
deptMap.put("data_id",deptInfo.getDeptId());
deptMap.put("name",deptInfo.getName());
deptMap.put("parent_id",deptInfo.getParentId());
mdmMap.put("mdm_dd_dept",deptMap);
//保存部门到主数据
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
.put("apiCode", apiCode)//中台接口
.put("publicKey",DDPUBLICKEY)//钉钉应用
.put("secretKey",DDSECRETKEY)//钉钉应用
.put("appId",APPCODE)//中台应用
.build();
String body = HttpRequest.post(URL).addHeaders(headerMap).body(com.alibaba.fastjson.JSONObject.toJSONString(mdmMap)).timeout(60000).execute().body();
return body;
}
}
return null;
}
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.plugin.kjs.service;
import com.alibaba.fastjson.JSONObject;
/**
* @Description 发货单插件service
* @Author xiangerlin
* @Date 2024/8/22 16:43
**/
public interface IDeliveryOrderPluginService {
/**
* 发货单同步到wms
* @param requestJson
* @return
*/
String sync2wms(JSONObject requestJson);
}

View File

@ -0,0 +1,12 @@
package com.hzya.frame.plugin.kjs.service;
import com.alibaba.fastjson.JSONObject;
public interface IDingTalkBuService {
/**
* 获取考勤打卡信息
* @return
*/
String getAttendanceList(JSONObject requestJso);
}

View File

@ -0,0 +1,23 @@
package com.hzya.frame.plugin.kjs.service;
/**
* @Description 钉钉部门人员初始化
* @Author xiangerlin
* @Date 2024/9/2 16:24
**/
public interface IDingTalkInitService {
/**
* 部门初始化仅初始化部门
* 这里只会用一次所以直接调用钉钉原生接口
* @return
*/
String deptInit(Long deptId);
/**
* 部门人员初始化
* 这里只会用一次所以直接调用钉钉原生接口
* @param deptId 部门id
* @return
*/
String userInit(Long deptId);
}

View File

@ -0,0 +1,18 @@
package com.hzya.frame.plugin.kjs.service;
import com.alibaba.fastjson.JSONObject;
/**
* @Description 生产订单同步wsm
* @Author xiangerlin
* @Date 2024/8/23 09:21
**/
public interface IMomOrderPluginService {
/**
* 生产订单单同步到wms
* @param requestJson
* @return
*/
String sync2wms(JSONObject requestJson);
}

View File

@ -0,0 +1,125 @@
package com.hzya.frame.plugin.kjs.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.plugin.kjs.service.IDeliveryOrderPluginService;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import com.hzya.frame.u8.delivery.dto.DeliveryDetailDTO;
import com.hzya.frame.u8.delivery.dto.DeliveryOrderDTO;
import com.hzya.frame.u8.delivery.entity.DeliveryDetailEntity;
import com.hzya.frame.u8.delivery.entity.DeliveryOrderEntity;
import com.hzya.frame.u8.delivery.service.DeliveryMapper;
import com.hzya.frame.u8.delivery.service.IDeliveryDetaiService;
import com.hzya.frame.u8.delivery.service.IDeliveryOrderService;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @Description 发货单插件service
* @Author xiangerlin
* @Date 2024/8/22 16:46
**/
public class DeliveryOrderPluginServiceImpl extends KjsPluginBaseService implements IDeliveryOrderPluginService {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IDeliveryOrderService deliveryOrderService;
@Autowired
private IDeliveryDetaiService deliveryDetaiService;
@Resource
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
/**
* 发货单同步到wsm
* @param requestJson
* @return
*/
@Override
public String sync2wms(JSONObject requestJson) {
if (null != requestJson){
requestJson = super.check(requestJson);
//数据源编码
String datasourceCode = requestJson.getString("sourceCode");
//开始时间
String startTime = DateUtil.format(requestJson.getDate("startTime"),"yyyy-MM-dd HH:mm:ss");
//结束时间
String endTime = DateUtil.format(requestJson.getDate("endTime"),"yyyy-MM-dd HH:mm:ss");
//1 查询发货单主表
DeliveryOrderEntity orderEntity = new DeliveryOrderEntity();
orderEntity.setDataSourceCode(datasourceCode);
String id = requestJson.getString("integration_task_living_details_id");
if (StrUtil.isEmpty(id)){
orderEntity.setStartTime(startTime);
orderEntity.setEndTime(endTime);
//orderEntity.setDlid("1000000152");
orderEntity.setbReturnFlag("0");
}else {
IntegrationTaskLivingDetailsEntity taskLivingDetails = taskLivingDetailsService.get(id);
orderEntity.setDlid(taskLivingDetails.getRootAppPk());
}
List<DeliveryOrderEntity> orderList = deliveryOrderService.query(orderEntity);
if (CollectionUtils.isNotEmpty(orderList)){
for (DeliveryOrderEntity order : orderList) {
logger.info("表头数据{}", JSON.toJSONString(order));
try {
//2 查询发货单明细表
DeliveryDetailEntity detailEntity = new DeliveryDetailEntity();
detailEntity.setDlid(order.getDlid());
detailEntity.setDataSourceCode(datasourceCode);
detailEntity.setDbname(order.getDbname());
List<DeliveryDetailEntity> detailList = deliveryDetaiService.query(detailEntity);
//发货单表头entity转dto
DeliveryOrderDTO deliveryOrderDTO = DeliveryMapper.INSTANCE.deliveryEntityToDto(order);
//发货单表体entity转dto
List<DeliveryDetailDTO> deliveryDetailList = DeliveryMapper.INSTANCE.deliveryDetailListToDto(detailList);
deliveryOrderDTO.setItems(deliveryDetailList);
String reqParams = JSONObject.toJSONString(deliveryOrderDTO);
logger.info("发货单请求参数:{}",reqParams);
//调用wms接口
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
.put("apiCode", "8000080008")
.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
.put("appId","800008")
.build();
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(reqParams).timeout(60000).execute().body();
//保存自定义项 标记推送状态
order.setDataSourceCode(datasourceCode);
//deliveryOrderService.saveExtradefine(order);
if (StrUtil.isNotEmpty(body)){
JSONObject jsonObject = JSONObject.parseObject(body);
Boolean flag = jsonObject.getBoolean("flag");
//保存日志
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
taskLivingDetail.setCreate_time(new Date());
taskLivingDetail.setModify_time(new Date());
taskLivingDetail.setRootAppPk(order.getDlid());
taskLivingDetail.setRootAppBill(order.getCdlcode());
taskLivingDetail.setPluginId("kjsDeliveryOrderPlugin");
taskLivingDetail.setRootAppNewData(reqParams);
taskLivingDetail.setNewTransmitInfo(body);
taskLivingDetail.setNewPushDate(new Date());
this.saveLog(id,flag,taskLivingDetail);
}
}catch(Exception e){
logger.error("同步发货单到wsm出错:{}",e);
}
}
}
}
return null;
}
}

View File

@ -0,0 +1,113 @@
package com.hzya.frame.plugin.kjs.service.impl;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.dingtalk.api.response.OapiAttendanceListRecordResponse;
import com.hzya.frame.dingtalk.service.IDingTalkService;
import com.hzya.frame.kjsData.attendance.entity.AttendanceEntity;
import com.hzya.frame.plugin.kjs.service.IDingTalkBuService;
import com.hzya.frame.sysnew.comparison.service.impl.ComparisonServiceImpl;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.text.SimpleDateFormat;
import java.util.*;
public class DingTalkBuServiceImpl implements IDingTalkBuService {
@Value("${dingtalk.appKey:}")
private String appKey;
@Value("${dingtalk.appSecret:}")
private String appSecret;
@Autowired
private IDingTalkService dingTalkService;
@Autowired
private ComparisonServiceImpl comparisonServiceimpl;
@Override
public String getAttendanceList(JSONObject requestJson){
//获取用户信息
JSONObject jsonObjectUser = new JSONObject();
JSONObject jsonStr = new JSONObject();
jsonObjectUser.put("mdmCode", "10015");
jsonStr.put("jsonStr", jsonObjectUser);
//先查询编码和名称查询是否存在
Object attribute = comparisonServiceimpl.queryEntityPage(jsonStr);
JSONObject jsonObjectAttribute = (JSONObject) JSON.toJSON(attribute);
JSONArray jsonArrayList = jsonObjectAttribute.getJSONObject("pageInfo").getJSONArray("list");
List<String> userIds = new ArrayList<>();
List<AttendanceEntity> userList = new ArrayList<>();
for (int i = 0; i < jsonArrayList.size(); i++) {
JSONObject item = jsonArrayList.getJSONObject(i).getJSONObject("mdm_dd_user");
userIds.add(item.getString("userid"));
AttendanceEntity user = new AttendanceEntity();
user.setUserid(item.getString("userid"));
user.setUsername(item.getString("name"));
user.setUserjob(item.getString("job_number"));
userList.add(user);
}
int groupSize = 50;
String result = "";
for (int i = 0; i < userIds.size(); i += groupSize) {
List<String> subList = userIds.subList(i, Math.min(i + groupSize, userIds.size()));
result = saveAttendanceList(subList, userList);
}
return result;
}
public String saveAttendanceList(List<String> ids, List<AttendanceEntity> userList){
//根据用户id去获取打卡记录
List<OapiAttendanceListRecordResponse.Recordresult> attendanceList =
dingTalkService.getAttendanceList(ids,"dingq3vbsswvyujiuwa7", "m4IRNcKQn-W9QBLERHWt0iW2hSirvxPS684xiNw-4QFMNg2gsBCur9T4QMvvAR4I");
List<AttendanceEntity> list = new ArrayList<>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
for (int i = 0; i < attendanceList.size(); i++) {
OapiAttendanceListRecordResponse.Recordresult jsonObject = attendanceList.get(i);
AttendanceEntity entity = new AttendanceEntity();
entity.setUserid(jsonObject.getUserId());
entity.setUserchecktime(jsonObject.getUserCheckTime() != null ? sdf.format(jsonObject.getUserCheckTime()): null);
entity.setUserlongitude(jsonObject.getUserLongitude());
entity.setUserlatitude(jsonObject.getUserLatitude());
entity.setWorkdate(jsonObject.getWorkDate() != null ? sdf.format(jsonObject.getWorkDate()): null);
entity.setUseraddress(jsonObject.getUserAddress());
entity.setTimeresult(jsonObject.getTimeResult());
entity.setSourcetype(jsonObject.getSourceType());
entity.setOutsideremark(jsonObject.getOutsideRemark());
entity.setLocationresult(jsonObject.getLocationResult());
entity.setGmtmodified(jsonObject.getGmtModified() != null ? sdf.format(jsonObject.getGmtModified()): null);
entity.setChecktype(jsonObject.getCheckType());
entity.setBasechecktime(jsonObject.getBaseCheckTime() != null ? sdf.format(jsonObject.getBaseCheckTime()): null);
Optional<AttendanceEntity> userInfo = userList.stream().filter(s->s.getUserid().equals(entity.getUserid()))
.findFirst();
if (userInfo.isPresent()){
entity.setUsername(userInfo.get().getUsername());
entity.setUserjob(userInfo.get().getUserjob());
}
list.add(entity);
}
String body = "";
int groupSize = 100;
for (int i = 0; i < list.size(); i += groupSize) {
List<AttendanceEntity> subList = list.subList(i, Math.min(i + groupSize, list.size()));
String reqParams = JSONObject.toJSONString(subList);
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
.put("apiCode", "8000100000")
.put("publicKey","ZJYAn/EBWEhLUMezDLU4iZ1vTO9kc6pM6XrYLajnqnK60Q9Ce7eDIk+3zDUT+v578prj")
.put("secretKey","ctMIYyauwoKSFeU4tg5gH1aWC/3OJK6HsKJrSR0oyDmdmdvRNgdoTzX0C1OQ+whrj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
.put("appId","800010")
.build();
body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(reqParams).timeout(60000).execute().body();
}
return body;
}
}

View File

@ -0,0 +1,135 @@
package com.hzya.frame.plugin.kjs.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.http.HttpRequest;
import com.dingtalk.api.DefaultDingTalkClient;
import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.OapiV2DepartmentListsubRequest;
import com.dingtalk.api.request.OapiV2UserListRequest;
import com.dingtalk.api.response.OapiV2DepartmentGetResponse;
import com.dingtalk.api.response.OapiV2DepartmentListsubResponse;
import com.dingtalk.api.response.OapiV2UserGetResponse;
import com.dingtalk.api.response.OapiV2UserListResponse;
import com.hzya.frame.dingtalk.enums.OrgEventEnum;
import com.hzya.frame.dingtalk.service.IDingTalkService;
import com.hzya.frame.dingtalk.util.DingTalkAccessToken;
import com.hzya.frame.plugin.kjs.service.GenericEventConsumer;
import com.hzya.frame.plugin.kjs.service.IDingTalkInitService;
import com.taobao.api.ApiException;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.util.*;
/**
* @Description 钉钉部门人员初始化
* @Author xiangerlin
* @Date 2024/9/2 16:24
**/
public class DingTalkInitServiceImpl implements IDingTalkInitService {
@Value("${dingtalk.appKey:}")
private String appKey;
@Value("${dingtalk.appSecret:}")
private String appSecret;
@Autowired
private IDingTalkService dingTalkService;
@Autowired
private GenericEventConsumer commonEventConsumer;
/**
* 部门初始化仅初始化部门
* 这里只会用一次所以直接调用钉钉原生接口
* @return
*/
@Override
public String deptInit(Long deptId) {
List<Long> deptIdList = new LinkedList<>();
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> deptBaseResponseList = new LinkedList<>();
recursiveDept(deptId, appKey, appSecret,deptIdList,deptBaseResponseList);
System.out.println(deptIdList.size());
if (CollectionUtils.isNotEmpty(deptIdList) && deptIdList.size() == deptBaseResponseList.size()){
for (OapiV2DepartmentListsubResponse.DeptBaseResponse resp : deptBaseResponseList) {
Map<String,Object> mdmMap = new LinkedHashMap<>();
mdmMap.put("mdmCode",GenericEventConsumer.DDDEPTMDMCODE);
mdmMap.put("optionName","系统管理员");
Map<String,Object> deptMap = new LinkedHashMap<>();
deptMap.put("dept_id",resp.getDeptId());
deptMap.put("data_id",resp.getDeptId());
deptMap.put("name",resp.getName());
deptMap.put("parent_id",resp.getParentId());
mdmMap.put("mdm_dd_dept",deptMap);
//保存部门到主数据
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
.put("apiCode", GenericEventConsumer.MDMADDCODE)//中台接口
.put("publicKey",GenericEventConsumer.DDPUBLICKEY)//钉钉应用
.put("secretKey",GenericEventConsumer.DDSECRETKEY)//钉钉应用
.put("appId",GenericEventConsumer.APPCODE)//中台应用
.build();
String body = HttpRequest.post(GenericEventConsumer.URL).addHeaders(headerMap).body(com.alibaba.fastjson.JSONObject.toJSONString(mdmMap)).timeout(60000).execute().body();
System.out.println(body);
}
}
return null;
}
private void queryPageUser(OapiV2UserListRequest req,List<OapiV2UserListResponse.ListUserResponse> userList) {
boolean hasMore = true;
do {
hasMore = false;
OapiV2UserListResponse.PageResult pageResult = dingTalkService.getUserListByDeptId(req, appKey, appSecret);
hasMore = pageResult.getHasMore();
req.setCursor(pageResult.getNextCursor());
userList.addAll(pageResult.getList());
}while (hasMore);
}
/**
* 人员初始化
* @param deptId 部门id
* @return
*/
@Override
public String userInit(Long deptId) {
List<Long> deptIdList = new LinkedList<>();
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> deptBaseResponseList = new LinkedList<>();
recursiveDept(deptId, appKey, appSecret,deptIdList,deptBaseResponseList);
System.out.println(deptIdList.size());
if (CollectionUtils.isNotEmpty(deptIdList)){
for (Long id : deptIdList) {
List<OapiV2UserListResponse.ListUserResponse> userList = new LinkedList<>();
//查询部门下人员信息
OapiV2UserListRequest req = new OapiV2UserListRequest();
req.setDeptId(id);
req.setCursor(0L);
queryPageUser(req,userList);
if (CollectionUtils.isNotEmpty(userList)){
for (OapiV2UserListResponse.ListUserResponse resp : userList) {
//查询user详情
OapiV2UserGetResponse.UserGetResponse userGetResponse = dingTalkService.getUserById(resp.getUserid(), appKey, appSecret);
commonEventConsumer.createMdmUser(OrgEventEnum.USER_MODIFY_ORG.getCode(), userGetResponse);
}
}
}
}
return null;
}
private void recursiveDept(Long deptId,String appKey,String appSecret,List<Long> deptIdList,List<OapiV2DepartmentListsubResponse.DeptBaseResponse> deptBaseResponseList){
if (deptId.longValue() != 1L){
deptIdList.add(deptId);
}
//1查询部门档案
List<OapiV2DepartmentListsubResponse.DeptBaseResponse> deptList = dingTalkService.getDeptList(deptId, appKey, appSecret);
if (CollectionUtils.isNotEmpty(deptList)){
for (OapiV2DepartmentListsubResponse.DeptBaseResponse deptBaseResponse : deptList) {
System.out.println(deptBaseResponse.getName());
deptBaseResponseList.add(deptBaseResponse);
recursiveDept(deptBaseResponse.getDeptId(),appKey,appSecret,deptIdList,deptBaseResponseList);
}
}
}
}

View File

@ -0,0 +1,67 @@
package com.hzya.frame.plugin.kjs.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Resource;
/**
* @Description 共用接口
* @Author xiangerlin
* @Date 2024/8/23 18:45
**/
public class KjsPluginBaseService {
Logger logger = LoggerFactory.getLogger(getClass());
@Resource
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
/**
* 检查请求参数
* @param requestJson
* @return
*/
public JSONObject check(JSONObject requestJson) {
if (null == requestJson){
requestJson = new JSONObject();
}
if (StrUtil.isEmpty(requestJson.getString("sourceCode"))){
requestJson.put("sourceCode","YONYOUU8");
}
if (StrUtil.isEmpty(requestJson.getString("startTime"))){
requestJson.put("startTime", DateUtil.now());
}
if (StrUtil.isEmpty(requestJson.getString("endTime"))){
requestJson.put("endTime", DateUtil.now());
}
return requestJson;
}
public void saveLog(String integration_task_living_details_id, Boolean flag, IntegrationTaskLivingDetailsEntity taskLivingDetail){
try {
//判断成功调用这个方法
if (StrUtil.isEmpty(integration_task_living_details_id)){
if (flag){
taskLivingDetailsService.saveLogToSuccess(taskLivingDetail);
}else {
//失败 调用这个方法
taskLivingDetailsService.saveLogToFail(taskLivingDetail);
}
}else {
taskLivingDetail.setId(integration_task_living_details_id);
if (flag){
//如果是重试 成功调这个方法
taskLivingDetailsService.saveLogFailToSuccess(taskLivingDetail);
}else {
//如果是重试 失败调这个方法
taskLivingDetailsService.updateLogFailToSuccess(taskLivingDetail);
}
}
}catch (Exception e){
logger.error("保存日志出错:{}",e);
}
}
}

View File

@ -0,0 +1,124 @@
package com.hzya.frame.plugin.kjs.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.plugin.kjs.service.IMomOrderPluginService;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.service.IIntegrationTaskLivingDetailsService;
import com.hzya.frame.u8.production.dto.MomOrderDTO;
import com.hzya.frame.u8.production.dto.MomOrderDetailDTO;
import com.hzya.frame.u8.production.entity.MomOrderDetailEntity;
import com.hzya.frame.u8.production.entity.MomOrderEntity;
import com.hzya.frame.u8.production.service.IMomOrderDetailService;
import com.hzya.frame.u8.production.service.IMomOrderService;
import com.hzya.frame.u8.production.service.MomOrderMapper;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @Description 生产订单同步wsm
* @Author xiangerlin
* @Date 2024/8/23 09:21
**/
public class MomOrderPluginServiceImpl extends KjsPluginBaseService implements IMomOrderPluginService {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private IMomOrderService momOrderService;
@Autowired
private IMomOrderDetailService momOrderDetailService;
@Resource
private IIntegrationTaskLivingDetailsService taskLivingDetailsService;
/**
* 生产订单单同步到wms
*
* @param requestJson
* @return
*/
@Override
public String sync2wms(JSONObject requestJson) {
if (null != requestJson){
requestJson = super.check(requestJson);
//数据源编码
String datasourceCode = requestJson.getString("sourceCode");
//开始时间
String startTime = DateUtil.format(requestJson.getDate("startTime"),"yyyy-MM-dd HH:mm:ss");
//结束时间
String endTime = DateUtil.format(requestJson.getDate("endTime"),"yyyy-MM-dd HH:mm:ss");
MomOrderEntity entity = new MomOrderEntity();
entity.setDataSourceCode(datasourceCode);
String id = requestJson.getString("integration_task_living_details_id");
//如果这个id不为空说明是重试
if (StrUtil.isEmpty(id)){
entity.setStartTime(startTime);
entity.setEndTime(endTime);
}else {
IntegrationTaskLivingDetailsEntity taskLivingDetails = taskLivingDetailsService.get(id);
entity.setMoId(taskLivingDetails.getRootAppPk());
}
//1查询主表
List<MomOrderEntity> orderList = momOrderService.query(entity);
if (CollectionUtils.isNotEmpty(orderList)){
for (MomOrderEntity order : orderList) {
try {
//查询生产订单明细表
MomOrderDetailEntity detailEntity = new MomOrderDetailEntity();
detailEntity.setMoId(order.getMoId());
if (StrUtil.isEmpty(id)){
detailEntity.setStartTime(startTime);
detailEntity.setEndTime(endTime);
}
detailEntity.setDataSourceCode(datasourceCode);
List<MomOrderDetailEntity> detailList = momOrderDetailService.query(detailEntity);
//表头转换dto
MomOrderDTO momOrderDTO = MomOrderMapper.INSTANCE.momOrderEntityToDto(order);
//表体转换dto
List<MomOrderDetailDTO> momOrderDetailList = MomOrderMapper.INSTANCE.momOrderDetailListToDto(detailList);
momOrderDTO.setItems(momOrderDetailList);
String reqParam = JSONObject.toJSONString(momOrderDTO);
logger.info("u8生产订单传wms请求参数:{}",reqParam);
Map<String, String> headerMap = MapBuilder.<String, String>create(true)
.put("apiCode", "8000080007")
.put("publicKey","ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj")
.put("secretKey","fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=")
.put("appId","800008")
.build();
String body = HttpRequest.post("http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(reqParam).timeout(60000).execute().body();
if (StrUtil.isNotEmpty(body)){
JSONObject jsonObject = JSONObject.parseObject(body);
Boolean flag = jsonObject.getBoolean("flag");
//保存自定义项 标记推送状态
order.setDataSourceCode(datasourceCode);
//momOrderService.saveExtradefine(order);
//保存日志
IntegrationTaskLivingDetailsEntity taskLivingDetail = new IntegrationTaskLivingDetailsEntity();
taskLivingDetail.setCreate_time(new Date());
taskLivingDetail.setModify_time(new Date());
taskLivingDetail.setRootAppPk(order.getMoId());
taskLivingDetail.setRootAppBill(order.getMocode());
taskLivingDetail.setPluginId("kjsMomOrderPlugin");
taskLivingDetail.setRootAppNewData(reqParam);
taskLivingDetail.setNewTransmitInfo(body);
taskLivingDetail.setNewPushDate(new Date());
this.saveLog(id,flag,taskLivingDetail);
}
}catch (Exception e){
logger.error("生产订单同步wsm出错:{}",e);
}
}
}
}
return null;
}
}

View File

@ -0,0 +1,42 @@
package com.hzya.frame.plugin.kjs.util;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* @Description 用线程消费订阅事件的消息
* @Author xiangerlin
* @Date 2024/8/27 15:10
**/
public class GenericEventThreadPool {
private static final int MAX_THREADS = 10; // 最大线程数可以根据需要调整
private static final int TASK_QUEUE_SIZE = 100; // 任务队列大小可以根据需要调整
private final ExecutorService executorService;
public GenericEventThreadPool() {
// 创建固定线程数的线程池
executorService = new ThreadPoolExecutor(
MAX_THREADS,
MAX_THREADS,
0L,
TimeUnit.MILLISECONDS,
new ArrayBlockingQueue<>(TASK_QUEUE_SIZE),
new ThreadPoolExecutor.CallerRunsPolicy());
}
//提交任务
public void executeTask(Runnable task) {
executorService.execute(task);
}
//关闭线程池
public void close() {
if (executorService!= null &&!executorService.isShutdown()) {
executorService.shutdown();
}
}
}

View File

@ -30,17 +30,17 @@ public class MdmPluginInitializer extends PluginBaseEntity{
@Override
public String getPluginId() {
return "MdmCustomerPlugin";
return "MdmPlugin";
}
@Override
public String getPluginName() {
return "MdmCustomerPlugin插件";
return "MdmPlugin插件";
}
@Override
public String getPluginLabel() {
return "MdmCustomerPlugin";
return "MdmPlugin";
}
@Override

View File

@ -452,6 +452,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
}
}
} catch (Exception e) {
logger.info("执行异常错误原因:"+e);
logger.error("新增返回脚本解析保存三方id错误"+jsonResultEntity.getAttribute());
taskDetailEntity.setResult("新增返回脚本解析保存三方id错误");
taskLivingDetailsService.updateLogFailToSuccess(taskDetailEntity);
@ -543,7 +544,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
map1.put("tableName",mainDb);
map1.put("dataStatus", "N");
map1.put("deleteStatus", "0");
map1.put("size", 10);
map1.put("size", 50);
objects = mdmModuleDao.queryMdmSTs(map1);
objects = toLowerCaseKeys(objects);
@ -738,7 +739,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
map1.put("tableName",mainDb);
//map1.put("dataStatus", "F");
map1.put("updateStatus", "0");
map1.put("size", 10);
map1.put("size", 50);
objects = mdmModuleDao.queryMdmSTs(map1);
objects = toLowerCaseKeys(objects);
@ -926,7 +927,7 @@ public class MdmModulePluginInitializer extends PluginBaseEntity {
map1.put("tableName",mainDb);
//map1.put("dataStatus", "Y");
map1.put("addStatus", "0");
map1.put("size", 100);
map1.put("size", 50);
objects = mdmModuleDao.queryMdmSTs(map1);
objects = toLowerCaseKeys(objects);

View File

@ -0,0 +1,7 @@
package com.hzya.frame.plugin.oaReceipt.dao;
import com.hzya.frame.basedao.dao.IBaseDao;
import com.hzya.frame.plugin.oaReceipt.entity.OaReceiptEntity;
public interface IOaReceiptDao extends IBaseDao<OaReceiptEntity, String> {
}

View File

@ -0,0 +1,8 @@
package com.hzya.frame.plugin.oaReceipt.dao.impl;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import com.hzya.frame.plugin.oaReceipt.dao.IOaReceiptDao;
import com.hzya.frame.plugin.oaReceipt.entity.OaReceiptEntity;
public class OaReceiptDaoImpl extends MybatisGenericDao<OaReceiptEntity, String> implements IOaReceiptDao {
}

View File

@ -0,0 +1,6 @@
package com.hzya.frame.plugin.oaReceipt.entity;
import com.hzya.frame.web.entity.BaseEntity;
public class OaReceiptEntity extends BaseEntity {
}

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.plugin.oaReceipt.dao.impl.OaReceiptDaoImpl">
<resultMap id="get-OaReceiptEntity-result" type="com.hzya.frame.plugin.oaReceipt.entity.OaReceiptEntity" >
<result property="id" column="id" jdbcType="VARCHAR"/>
</resultMap>
<!-- 查询的字段-->
<sql id = "PayBillEntity_Base_Column_List">
id
</sql>
</mapper>

View File

@ -0,0 +1,58 @@
package com.hzya.frame.plugin.oaReceipt.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.a8bill.plugin.PayBillPluginInitializer;
import com.hzya.frame.seeyon.receiptFor.service.IReceiptForService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
public class OaReceiptPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(PayBillPluginInitializer.class);
@Autowired
private IReceiptForService receiptForService;
@Override
public void initialize() {
logger.info(getPluginLabel() + "執行初始化方法initialize()");
}
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
@Override
public String getPluginId() {
return "OaReceiptPlugin";
}
@Override
public String getPluginName() {
return "OaReceiptPlugin插件";
}
@Override
public String getPluginLabel() {
return "OaReceiptPlugin";
}
@Override
public String getPluginType() {
return "1";
}
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) {
try {
logger.info("======开始执行付款单据信息同步========");
return receiptForService.sendReceiptFor(requestJson);
}catch (Exception e){
logger.info("======执行付款单据同步失败:{}========",e.getMessage());
e.printStackTrace();
}
return null;
}
}

View File

@ -0,0 +1,7 @@
package com.hzya.frame.plugin.oaReceipt.service;
import com.hzya.frame.basedao.service.IBaseService;
import com.hzya.frame.plugin.oaReceipt.entity.OaReceiptEntity;
public interface IOaReceiptService extends IBaseService<OaReceiptEntity, String> {
}

View File

@ -0,0 +1,8 @@
package com.hzya.frame.plugin.oaReceipt.service.impl;
import com.hzya.frame.basedao.service.impl.BaseService;
import com.hzya.frame.plugin.oaReceipt.entity.OaReceiptEntity;
import com.hzya.frame.plugin.oaReceipt.service.IOaReceiptService;
public class OaReceiptServiceImpl extends BaseService<OaReceiptEntity, String> implements IOaReceiptService {
}

View File

@ -0,0 +1,100 @@
package com.hzya.frame.plugin.u8c.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.u8c.service.ISalesBillingService;
import com.hzya.frame.u8c.sosale.service.ISoSaleService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
public class SaleConPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(SaleConPluginInitializer.class);
@Autowired
private ISoSaleService soSaleService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "SaleConPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "U8C销售合同同步OA销售合同";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "U8C销售合同同步OA销售合同插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
soSaleService.getU8cSaleToOa(requestJson);
return BaseResult.getSuccessMessageEntity("销售订单同步OA成功");
}
}

View File

@ -0,0 +1,98 @@
package com.hzya.frame.plugin.u8c.plugin;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.base.PluginBaseEntity;
import com.hzya.frame.plugin.u8c.service.ISalesBillingService;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
public class SalesBillingPluginInitializer extends PluginBaseEntity {
Logger logger = LoggerFactory.getLogger(SalesBillingPluginInitializer.class);
@Autowired
private ISalesBillingService salesBillingService;
/***
* 插件初始化方法
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 10:48
* @Param []
* @return void
**/
@Override
public void initialize() {
}
/****
* 插件销毁方法
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public void destroy() {
logger.info(getPluginLabel() + "執行銷毀方法destroy()");
}
/****
* 插件的ID
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginId() {
return "SalesBillingPlugin";
}
/****
* 插件的名称
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginName() {
return "u8c销售开票审核状态同步插件";
}
/****
* 插件的显示值
* @author 👻👻👻👻👻👻👻👻 gjh
* @date 2023-08-02 10:48
* @return void
**/
@Override
public String getPluginLabel() {
return "u8c销售开票审核状态同步插件";
}
/***
* 插件类型 1场景插件
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-02 14:01
* @Param []
* @return java.lang.String
**/
@Override
public String getPluginType() {
return "1";
}
/***
* 执行业务代码
* @Author 👻👻👻👻👻👻👻👻 gjh
* @Date 2023-08-07 11:20
* @param requestJson 执行业务代码的参数
* @return void
**/
@Override
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
JsonResultEntity jsonResultEntity = salesBillingService.doSalesBilling(requestJson);
return jsonResultEntity;
}
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.plugin.u8c.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.web.entity.JsonResultEntity;
public interface ISalesBillingService {
/**
* @Author lvleigang
* @Description OA同步销售开票审核状态到U8C
* @Date 10:21 上午 2024/8/2
* @param requestJson
* @return com.hzya.frame.web.entity.JsonResultEntity
**/
JsonResultEntity doSalesBilling(JSONObject requestJson);
}

View File

@ -0,0 +1,161 @@
package com.hzya.frame.plugin.u8c.service.impl;
import cn.hutool.core.map.MapBuilder;
import cn.hutool.http.HttpRequest;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.plugin.u8c.service.ISalesBillingService;
import com.hzya.frame.u8c.salesBilling.entity.U8cSalesBillingEntity;
import com.hzya.frame.u8c.salesBilling.service.IU8cSalesBillingService;
import com.hzya.frame.web.entity.BaseResult;
import com.hzya.frame.web.entity.JsonResultEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import java.util.List;
import java.util.Map;
public class SalesBillingServiceImpl implements ISalesBillingService {
Logger logger = LoggerFactory.getLogger(SalesBillingServiceImpl.class);
@Value("${OA.data_source_code:}")
private String oa_data_source_code;
@Autowired
private IU8cSalesBillingService iu8cSalesBillingService;
private final String appId = "800035";
//这个接口调错了要用开发的那个审批接口
//private final String apiCode = "8000350047";
private final String apiCode = "8000350060";
private final String publicKey = "ZJYATW/MfYZX7zF0eAh4DJXbyTLwUtwSoSz5Y/o1ksAaN/dCe7eDIk+3zDUT+v578prj";
private final String secretKey = "+5BUkLQh3iX3VHgEt5bE2IPh+ZeebGvDaEspsvVu739Ar6sFnwg+fpPod4t6XhoTj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=";
/**
* @param requestJson
* @return com.hzya.frame.web.entity.JsonResultEntity
* @Author lvleigang
* @Description 同步销售开票审核状态
* @Date 10:21 上午 2024/8/2
**/
@Override
public JsonResultEntity doSalesBilling(JSONObject requestJson) {
//查询需要同步的数据
try {
U8cSalesBillingEntity u8cSalesBillingEntity = new U8cSalesBillingEntity();
u8cSalesBillingEntity.setDataSourceCode(oa_data_source_code);
List<U8cSalesBillingEntity> u8cSalesBillingEntities = iu8cSalesBillingService.queryDoSalesBilling(u8cSalesBillingEntity);
if (u8cSalesBillingEntities != null && u8cSalesBillingEntities.size() > 0) {
for (int i = 0; i < u8cSalesBillingEntities.size(); i++) {
U8cSalesBillingEntity entity = u8cSalesBillingEntities.get(i);
String params = getSendData(entity);
//发送数据
String returnData = executeEsb(params,appId,apiCode,publicKey,secretKey);
//解析结果
boolean flag = analyzeReturnData(returnData);
if(flag){
entity.setPushStatus("Y");
}else {
entity.setPushStatus("N");
}
entity.setDataSourceCode(oa_data_source_code);
iu8cSalesBillingService.updateDoSalesBilling(entity);
}
return BaseResult.getSuccessMessageEntity("同步销售开票审核状态成功");
} else {
return BaseResult.getSuccessMessageEntity("同步销售开票审核状态成功");
}
} catch (Exception e) {
return BaseResult.getFailureMessageEntity("同步销售开票审核状态失败" + e.getMessage());
}
}
/**
* @Author lvleigang
* @Description 解析返回状态
* @Date 2:50 下午 2024/8/2
* @param returnData
* @return boolean
**/
private boolean analyzeReturnData(String returnData) {
boolean falg = false ;
if (JSONUtil.isTypeJSON(returnData)) {
JSONObject jsonObject = JSONObject.parseObject(returnData);
if(jsonObject != null && jsonObject.get("flag") != null && jsonObject.getBoolean("flag")) {
JSONObject attribute = jsonObject.getJSONObject("attribute");
if(attribute != null && attribute.get("status") != null && "success".equals(attribute.getString("status"))) {
falg = true;
}
}
}
return falg;
}
private String getSendData(U8cSalesBillingEntity entity) {
String params = "";
//{
// "queryinfo": {
// "code": [
// "SITH1904180026",
// "SOTH1805240023"
// ],
// "corp": "1000",
// "date_begin": "2019-03-24",
// "date_end": "2019-05-24"
// },
// "approveinfo": {
// "approvid": "18612329914",
// "approveDate": "2018-04-19",
// "status": "Y",
// "note": "哈哈"
// }
//}
JSONObject data = new JSONObject();
JSONObject queryinfo = new JSONObject();
JSONObject approveinfo = new JSONObject();
JSONArray code = new JSONArray();
code.add(entity.getCode());//单据号
queryinfo.put("code", code);
queryinfo.put("corp", entity.getCorp());//公司编码
queryinfo.put("date_begin", entity.getDateBegin());//单据开始日期
queryinfo.put("date_end", entity.getDateEnd());//单据结束日期
approveinfo.put("approvid", entity.getApprovid());//审批人
approveinfo.put("approveDate", entity.getApprovedate());//审核时间
approveinfo.put("status", entity.getStatus());//审批状态Y通过N不通过R驳回
approveinfo.put("note", entity.getNote());//批语
data.put("queryinfo", queryinfo);
data.put("approveinfo", approveinfo);
params = data.toJSONString();
//用新的审批接口
JSONObject jsonObject = new JSONObject();
jsonObject.put("billno",entity.getCode());
jsonObject.put("corpcode",entity.getCorp());
jsonObject.put("billType","saleinvoice");
jsonObject.put("userCode","15715849962");
jsonObject.put("ckeckResult","Y");
jsonObject.put("ckeckNote","审批通过");
params = jsonObject.toString();
return params;
}
public String executeEsb(String params, String appId, String apiCode, String publicKey, String secretKey) {
logger.info("请求apiCode:{},参数:{}", apiCode, params);
Map<String, String> header = MapBuilder.<String, String>create(true)
.put("apiCode", apiCode)
.put("publicKey", publicKey)
.put("secretKey", secretKey)
.put("appId", appId)
.build();
String res = HttpRequest.post("http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(header).body(params).timeout(60000).execute().body();
return res;
}
}

View File

@ -1,23 +0,0 @@
#######################澳星环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: GBK
file:
# 日志保存路径
path: E:\yongansystem\log
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://127.0.0.1:3306/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: E:\yongansystem\file
zt:
url: http://127.0.0.1:9081/kangarooDataCenterV3/entranceController/externalCallInterface

View File

@ -1,42 +0,0 @@
#######################dev环境#######################
logging:
#日志级别 指定目录级别
level:
root: warn
encodings: UTF-8
file:
# 日志保存路径
path: /home/webservice/zt/log
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: /home/webservice/zt/file
# path: D:\webservice\file
# pluginpath: D:\webservice\plugin
pluginpath: /home/webservice/zt/plugin
# tomcatpath: D:\apache-tomcat-9.0.69\webapps\kangarooDataCenter\WEB-INF\classes\
tomcatpath: /home/webservice/zt/tomcatV3/webapps/kangarooDataCenterV3/WEB-INF/classes/
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
# 这个私钥到时候上传到cbs和下面到是同一对
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826
#电子回单下载临时存放位置
elec_path: /Users/xiangerlin/Downloads/
OA:
data_source_code: yc_oa
zt:
url: http://127.0.0.1:9082/kangarooDataCenterV3/entranceController/externalCallInterface

View File

@ -1,27 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: D:\yongansystem\kangarooDataCenter\v3\logs
spring:
datasource:
dynamic:
datasource:
master:
# url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
# username: root
# password: bd993088e8a7c3dc5f44441617f9b4bf
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: D:\yongansystem\kangarooDataCenter\v3\logs
zt:
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface

View File

@ -12,7 +12,7 @@ spring:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter_kjs?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
@ -20,12 +20,15 @@ savefile:
# 文件保存路径
path: /Users/xiangerlin/work/app/logs/yuecheng
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
appId: 1Prpz
appSecret: 24bbe3a5abf39e1bea9cd3a
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
ya_private_key: 31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
# 这个私钥到时候上传到cbs和下面到是同一对
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826F3067A6B93BC3839C836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185
ya_public_key: 044fa399d2223760f17b81b864c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826F30836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185
dingtalk:
appKey: dingq3vbsswvyujiuwa7
appSecret: m4IRNcKQn-W9QBLERHWt0iW2hSirvxPS684xiNw-4QFMNg2gsBCur9T4QMvvAR4I

View File

@ -1,62 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /Users/apple/Desktop/log/local
spring:
data:
mongodb:
# host: 192.168.2.237
# port: 27017
# database: businesscenter
# auto-index-creation: true
# password: hzya1314
# username: hzya
flyway:
# 启动flyway migration, 默认为true
enabled: false
datasource:
dynamic:
druid:
filters: stat,log4j2
datasource:
master:
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
# username: hzyazt
# password: 62e4295b615a30dbf3b8ee96f41c820b
# driver-class-name: dm.jdbc.driver.DmDriver
# type: com.alibaba.druid.pool.DruidDataSource
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
# url: jdbc:dm://hzya.ufyct.com:9040/businesscenter?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
# url: jdbc:dm://hzya.ufyct.com:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
# username: hzyazt
# password: 62e4295b615a30dbf3b8ee96f41c820b
# driver-class-name: dm.jdbc.driver.DmDriver
savefile:
# 文件保存路径
path: /Users/apple/Desktop/log/local
tomcatpath: /Users/apple/Desktop/log/local
pluginpath: /Users/apple/Desktop/log/local
zt:
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
# 这个私钥到时候上传到cbs和下面到是同一对
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826
#电子回单下载临时存放位置
elec_path: /Users/xiangerlin/Downloads/
OA:
data_source_code: yc_oa

View File

@ -1,23 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /Users/apple/Desktop/log/local
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: /Users/apple/Desktop/log/local
zt:
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface

View File

@ -1,35 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /Users/xiangerlin/work/app/logs/dev
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: /Users/xiangerlin/work/app/file/dev
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
# 这个私钥到时候上传到cbs和下面到是同一对
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826F3067A6B93BC3839C836A06007869CD351FBBE388B51F742859388BBC1DE089923AAFBC69E448F15141DDF30EE6CE90185
#电子回单下载临时存放位置
elec_path: /Users/xiangerlin/Downloads/
OA:
data_source_code: yc-test

View File

@ -1,90 +0,0 @@
#logging:
# #日志级别 指定目录级别
# level:
# root: info
# encodings: UTF-8
# file:
# # 日志保存路径
# path: /zt/log
#spring:
# flyway:
# # 启动flyway migration, 默认为true
# enabled: false
# datasource:
# dynamic:
# druid:
# filters: stat,log4j2
# datasource:
# master:
# url: jdbc:dm://10.75.51.82:5238?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
# username: businesscenter
# password: 6842568689469adad597d144ee104063
# driver-class-name: dm.jdbc.driver.DmDriver
#savefile:
# # 文件保存路径
# path: /zt/file
#公司mysql
#ax:
# url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
#logging:
# #日志级别 指定目录级别warn
# level:
# root: info
# encodings: UTF-8
# file:
# # 日志保存路径
# path: /home/webservice/zt/log
#spring:
# datasource:
# dynamic:
# datasource:
# master:
# url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
# username: root
# password: 62e4295b615a30dbf3b8ee96f41c820b
# driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
#savefile:
# # 文件保存路径
# path: /home/webservice/zt/file
#公司服务器达梦
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /zt/log
spring:
flyway:
# 启动flyway migration, 默认为true
enabled: false
datasource:
dynamic:
druid:
filters: stat,log4j2
datasource:
master:
url: jdbc:dm://ufidahz.com.cn:9040?schema=businesscenter&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8&compatibleMode=oracle
username: hzyazt
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: dm.jdbc.driver.DmDriver
savefile:
# 文件保存路径
path: /zt/file
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
# 这个私钥到时候上传到cbs和下面到是同一对
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826
#电子回单下载临时存放位置
elec_path: /zt/elecfile
OA:
data_source_code: yc_oa

View File

@ -1,21 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: /Users/xiangerlin/work/app/logs/ydc
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: bd993088e8a7c3dc5f44441617f9b4bf
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: /Users/xiangerlin/work/app/logs/ydc

View File

@ -1,23 +0,0 @@
#######################本地环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: E:\yongansystem\log
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: bd993088e8a7c3dc5f44441617f9b4bf
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: E:\yongansystem\log
zt:
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface

View File

@ -1,39 +0,0 @@
#######################zqtlocal环境#######################
logging:
#日志级别 指定目录级别
level:
root: info
encodings: UTF-8
file:
# 日志保存路径
path: D:/local/logs/
spring:
datasource:
dynamic:
datasource:
master:
url: jdbc:mysql://ufidahz.com.cn:9014/businesscenter?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
username: root
password: 62e4295b615a30dbf3b8ee96f41c820b
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
savefile:
# 文件保存路径
path: D:/local/upload/
pluginpath : D:/local/plugin/
tomcatpath: E:\apache-tomcat-9.0.27\webapps\kangarooDataCenterV3\WEB-INF\classes\
cbs8:
appId: 1P4AGrpz
appSecret: 2c2369ae5dc04382844bbe3a5abf39e1bea9cd3a
url: https://cbs8-openapi-reprd.csuat.cmburl.cn
# 测试用这个 这个是银行给的,和下面的公钥不是一对密钥
ya_private_key: 83BA7EC821D35F4CB31FF9A51C1EFA520FC52AF828C2337F88E91CF119B07F44
# 这个私钥到时候上传到cbs和下面到是同一对
#ya_private_key: e1eacfdee9b8d4184437d5a2071e17ce31befc3d93395f9f05709ed562e8dc46
ya_public_key: 044fa399d2223760f17b81b863cb482b009294c4516f8a605dea1475ec09e720eaa98468715e5ad509a592a0b426061551c5a3df236966c23253a7d894eac0dcde
cbs_public_key: 0469146F06BF3B01236E84632441E826
#电子回单下载临时存放位置
elec_path: /Users/xiangerlin/Downloads/
OA:
data_source_code: yc_oa
zt:
url: http://127.0.0.1:9082/kangarooDataCenterV3/entranceController/externalCallInterface

View File

@ -93,7 +93,7 @@ mybatis-plus:
db-config:
id-type: auto # 主键策略
zt:
url: http://127.0.0.1:9999/kangarooDataCenterV3/entranceController/externalCallInterface
url: http://127.0.0.1:8901/kangarooDataCenterV3/entranceController/externalCallInterface
#JimuReport[minidao配置]
minidao :
base-package: org.jeecg.modules.jmreport.desreport.dao*

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>kjsPlugin</id>
<name>kjs插件</name>
<category>202408220001</category>
</plugin>

View File

@ -0,0 +1,19 @@
<?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="deliveryOrderPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.DeliveryOrderPluginInitializer" />
<bean name="momOrderPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.MomOrderPluginInitializer" />
<bean name="dingTalkInitPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.DingTalkInitPluginInitializer" />
<bean name="DingAttendancePluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.DingAttendancePluginInitializer" />
<bean name="SaleOutPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.SaleOutPluginInitializer" />
<bean name="ReceiptPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.ReceiptPluginInitializer" />
<bean name="SaleInvPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.SaleInvPluginInitializer" />
<bean name="OtherInPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.OtherInPluginInitializer" />
<bean name="OtherReceiptPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.OtherReceiptPluginInitializer" />
<bean name="OtherOutPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.OtherOutPluginInitializer" />
<bean name="JeckYunGoodsdocInPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.JeckYunGoodsdocInPluginInitializer" />
<bean name="JeckYunGoodsdocOutPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.JeckYunGoodsdocOutPluginInitializer" />
<bean name="JeckYunGoodsdocInBakPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.JeckYunGoodsdocInBakPluginInitializer" />
<bean name="JeckYunGoodsdocOutBakPluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.JeckYunGoodsdocOutBakPluginInitializer" />
<bean name="JeckYunGoodsdocInToU8PluginInitializer" class="com.hzya.frame.plugin.kjs.plugin.JeckYunGoodsdocInToU8PluginInitializer" />
</beans>

View File

@ -0,0 +1,10 @@
<?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="deliveryOrderPluginServiceImpl" class="com.hzya.frame.plugin.kjs.service.impl.DeliveryOrderPluginServiceImpl" />
<bean name="momOrderPluginServiceImpl" class="com.hzya.frame.plugin.kjs.service.impl.MomOrderPluginServiceImpl" />
<bean name="kjsPluginBaseService" class="com.hzya.frame.plugin.kjs.service.impl.KjsPluginBaseService" />
<bean name="genericEventConsumer" class="com.hzya.frame.plugin.kjs.service.GenericEventConsumer" />
<bean name="dingTalkInitServiceImpl" class="com.hzya.frame.plugin.kjs.service.impl.DingTalkInitServiceImpl" />
<bean name="dingTalkBuServiceImpl" class="com.hzya.frame.plugin.kjs.service.impl.DingTalkBuServiceImpl" />
</beans>

View File

@ -2,4 +2,5 @@
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="byName">
<bean name="mdmCustomerInitializer" class="com.hzya.frame.plugin.masterData.plugin.MdmPluginInitializer" />
<!--<bean name="MdmTestPluginInitializer" class="com.hzya.frame.plugin.masterData.plugin.MdmTestPluginInitializer" />-->
</beans>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>NingboBankPlugin</id>
<name>宁波银行财资大管家插件</name>
<category>202407250001</category>
</plugin>

View File

@ -0,0 +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="payBillPluginInitializerDaoImpl" class="com.hzya.frame.plugin.a8bill.dao.impl.PayBillPluginInitializerDaoImpl" />
</beans>

View File

@ -0,0 +1,10 @@
<?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="accLogPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.AccLogPluginInitializer" />
<bean name="ningboBankPayPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.NingboBankPayPluginInitializer" />
<bean name="ningboBankPayResultPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.NingboBankPayResultPluginInitializer" />
<bean name="ningboBankTTPayPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.NingboBankTTPayPluginInitializer" />
<bean name="ningboBankTTPayResultPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.NingboBankTTPayResultPluginInitializer" />
<bean name="payReqSyncU8CPluginInitializer" class="com.hzya.frame.plugin.a8bill.plugin.PayReqSyncU8CPluginInitializer" />
</beans>

View File

@ -0,0 +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="ningboBankPluginServiceImpl" class="com.hzya.frame.plugin.a8bill.service.impl.NingboBankPluginServiceImpl" />
</beans>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>OaReceiptPlugin</id>
<name>OaReceiptPlugin插件</name>
<category>90000026</category>
</plugin>

View File

@ -0,0 +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="oaReceiptCustomerDao" class="com.hzya.frame.plugin.oaReceipt.dao.impl.OaReceiptDaoImpl" />
</beans>

View File

@ -0,0 +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="oaReceiptCustomerInitializer" class="com.hzya.frame.plugin.oaReceipt.plugin.OaReceiptPluginInitializer" />
</beans>

View File

@ -0,0 +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="oaReceiptCustomerService" class="com.hzya.frame.plugin.oaReceipt.service.impl.OaReceiptServiceImpl" />
</beans>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<id>SalesBillingPlugin</id>
<name>u8c插件</name>
<category>202408020001</category>
</plugin>

View File

@ -0,0 +1,6 @@
<?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="SalesBillingPluginInitializer" class="com.hzya.frame.plugin.u8c.plugin.SalesBillingPluginInitializer" />
<bean name="SaleConPluginInitializer1" class="com.hzya.frame.plugin.u8c.plugin.SaleConPluginInitializer" />
</beans>

View File

@ -0,0 +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="salesBillingServiceImpl" class="com.hzya.frame.plugin.u8c.service.impl.SalesBillingServiceImpl" />
</beans>

View File

@ -15,6 +15,7 @@ import com.hzya.frame.cbs8.util.CbsAccessToken;
import com.hzya.frame.plugin.cbs8.plugin.PayApplyPluginInitializer;
import com.hzya.frame.plugin.cbs8.plugin.PayResultPluginInitializer;
import com.hzya.frame.plugin.cbs8.plugin.TransactionDetailPluginInitializer;
import com.hzya.frame.plugin.kjs.service.IDingTalkInitService;
import com.hzya.frame.plugin.seeyonExt.plugin.SeeyonExtPluginInitializer;
import com.hzya.frame.seeyon.cbs8.entity.PaymentEntity;
import com.hzya.frame.seeyon.cbs8.service.IPaymentService;
@ -65,9 +66,14 @@ public class temButtom {
private TransactionDetailPluginInitializer transactionDetailPluginInitializer;
@Autowired
private PayResultPluginInitializer payResultPluginInitializer;
@Autowired
private IDingTalkInitService dingTalkInitService;
@Test
public void dingTest(){
String s = dingTalkInitService.deptInit(1L);
}
@Test
public void cbs8PluginTest(){
try {
@ -180,7 +186,7 @@ public class temButtom {
public void test01() {
String a = AESUtil.encrypt("hzya@1314");
System.out.println(a);
String b = AESUtil.decrypt("62e4295b615a30dbf3b8ee96f41c820b");
String b = AESUtil.decrypt("ac58037088328bef497114ce83c895d3");
System.out.println(b);
}

View File

@ -51,7 +51,9 @@ public class GroovyUtil {
logger.info("创建newInstance失败:"+ e);
throw new BaseSystemException(e);
}
logger.info("开始执行脚本:"+parameterJson);
Object returnObj = groovyObject.invokeMethod("execute",parameterJson);
logger.info("脚本参数:{}",parameterJson);
logger.info("执行脚本结束:"+returnObj);
return returnObj;
}

13
pom.xml
View File

@ -384,6 +384,18 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>1.4.2.Final</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>1.4.2.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.dingtalk.open</groupId>
<artifactId>app-stream-client</artifactId>
@ -399,6 +411,7 @@
<artifactId>alibaba-dingtalk-service-sdk</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
<build>

View File

@ -0,0 +1,33 @@
package com.hzya.frame.Jackyun.goodsdocin.dao;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import java.util.List;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
public interface IGoodsdocInDao extends IBaseDao<GoodsdocInEntity,String> {
List<GoodsdocInEntity> checkBill(GoodsdocInEntity checkEntity);
GoodsdocInEntity saveGoodsdocIn(GoodsdocInEntity goodsdocIn);
List<GoodsdocInEntity> getGoodsdocInList(GoodsdocInEntity goodsdocInEntity);
GoodsdocInEntity saveGoodsdocInBak(GoodsdocInEntity item);
int deleteByRecId(String recId);
List<GoodsdocInEntity> getGoodsdocInListAll(GoodsdocInEntity goodsdocInEntity);
List<GoodsdocInEntity> getGoodsdocInListGroup(GoodsdocInEntity goodsdocInEntity);
int updateGoodsdocIn(GoodsdocInEntity goodsdocInEntity);
}

View File

@ -0,0 +1,27 @@
package com.hzya.frame.Jackyun.goodsdocin.dao;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import java.util.List;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
public interface IGoodsdocInDetailDao extends IBaseDao<GoodsdocInDetailEntity,String> {
GoodsdocInDetailEntity saveDetails(GoodsdocInDetailEntity details);
List<GoodsdocInDetailEntity> getGoodsdocInDetailList(GoodsdocInDetailEntity detailEntity);
GoodsdocInDetailEntity saveDetailsBak(GoodsdocInDetailEntity details);
int deleteByMainId(GoodsdocInDetailEntity detailEntity);
List<GoodsdocInDetailEntity> getGoodsdocInDetailListGroup(GoodsdocInDetailEntity detailEntity);
}

View File

@ -0,0 +1,26 @@
package com.hzya.frame.Jackyun.goodsdocin.dao;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInLogisticEntity;
import com.hzya.frame.basedao.dao.IBaseDao;
import java.util.List;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
public interface IGoodsdocInLogisticDao extends IBaseDao<GoodsdocInLogisticEntity,String> {
GoodsdocInLogisticEntity saveLogis(GoodsdocInLogisticEntity logis);
List<GoodsdocInLogisticEntity> getGoodsdocInLogisticList(GoodsdocInLogisticEntity logisEntity);
GoodsdocInLogisticEntity saveLogisBak(GoodsdocInLogisticEntity logis);
int deleteByMainId(GoodsdocInLogisticEntity logisEntity);
}

View File

@ -0,0 +1,61 @@
package com.hzya.frame.Jackyun.goodsdocin.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.Jackyun.goodsdocin.dao.IGoodsdocInDao;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
@Repository(value = "GoodsdocInDaoImpl")
public class GoodsdocInDaoImpl extends MybatisGenericDao<GoodsdocInEntity,String> implements IGoodsdocInDao {
@DS("jeckYun")
@Override
public List<GoodsdocInEntity> checkBill(GoodsdocInEntity checkEntity) {
return (List<GoodsdocInEntity>) super.selectList("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDaoImpl.entity_list_base", checkEntity);
}
@DS("jeckYun")
@Override
public GoodsdocInEntity saveGoodsdocIn(GoodsdocInEntity goodsdocIn) {
return super.save("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDaoImpl.entity_insert", goodsdocIn);
}
@DS("jeckYun")
@Override
public List<GoodsdocInEntity> getGoodsdocInList(GoodsdocInEntity goodsdocInEntity) {
return (List<GoodsdocInEntity>) selectList("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDaoImpl.entity_list_base_bak", goodsdocInEntity);
}
@DS("jeckYun")
@Override
public GoodsdocInEntity saveGoodsdocInBak(GoodsdocInEntity item) {
return save("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDaoImpl.entity_insert_bak",item);
}
@DS("jeckYun")
@Override
public int deleteByRecId(String recId) {
return delete("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDaoImpl.entity_delete", recId);
}
@DS("jeckYun")
@Override
public List<GoodsdocInEntity> getGoodsdocInListAll(GoodsdocInEntity goodsdocInEntity) {
return (List<GoodsdocInEntity>) selectList("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDaoImpl.entity_list_base_all", goodsdocInEntity);
}
@DS("jeckYun")
@Override
public List<GoodsdocInEntity> getGoodsdocInListGroup(GoodsdocInEntity goodsdocInEntity) {
return (List<GoodsdocInEntity>) selectList("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDaoImpl.entity_list_base_group", goodsdocInEntity);
}
@DS("jeckYun")
@Override
public int updateGoodsdocIn(GoodsdocInEntity goodsdocInEntity) {
return super.update("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDaoImpl.entity_update", goodsdocInEntity);
}
}

View File

@ -0,0 +1,46 @@
package com.hzya.frame.Jackyun.goodsdocin.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.Jackyun.goodsdocin.dao.IGoodsdocInDetailDao;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
@Repository(value = "GoodsdocInDetailDaoImpl")
public class GoodsdocInDetailDaoImpl extends MybatisGenericDao<GoodsdocInDetailEntity,String> implements IGoodsdocInDetailDao {
@DS("jeckYun")
@Override
public GoodsdocInDetailEntity saveDetails(GoodsdocInDetailEntity details) {
return super.save("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDetailDaoImpl.entity_insert", details);
}
@DS("jeckYun")
@Override
public List<GoodsdocInDetailEntity> getGoodsdocInDetailList(GoodsdocInDetailEntity detailEntity) {
return (List<GoodsdocInDetailEntity>) selectList("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDetailDaoImpl.entity_list_base", detailEntity);
}
@DS("jeckYun")
@Override
public GoodsdocInDetailEntity saveDetailsBak(GoodsdocInDetailEntity details) {
return super.save("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDetailDaoImpl.entity_insert_bak", details);
}
@DS("jeckYun")
@Override
public int deleteByMainId(GoodsdocInDetailEntity detailEntity) {
return super.delete("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDetailDaoImpl.entity_delete", detailEntity.getMainId());
}
@DS("jeckYun")
@Override
public List<GoodsdocInDetailEntity> getGoodsdocInDetailListGroup(GoodsdocInDetailEntity detailEntity) {
return (List<GoodsdocInDetailEntity>) selectList("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDetailDaoImpl.entity_list_base_group", detailEntity);
}
}

View File

@ -0,0 +1,43 @@
package com.hzya.frame.Jackyun.goodsdocin.dao.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.Jackyun.goodsdocin.dao.IGoodsdocInDao;
import com.hzya.frame.Jackyun.goodsdocin.dao.IGoodsdocInLogisticDao;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInLogisticEntity;
import com.hzya.frame.basedao.dao.MybatisGenericDao;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
@Repository(value = "GoodsdocInLogisticDaoImpl")
public class GoodsdocInLogisticDaoImpl extends MybatisGenericDao<GoodsdocInLogisticEntity,String> implements IGoodsdocInLogisticDao {
@DS("jeckYun")
@Override
public GoodsdocInLogisticEntity saveLogis(GoodsdocInLogisticEntity logis) {
return super.save("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInLogisticDaoImpl.entity_insert",logis);
}
@DS("jeckYun")
@Override
public List<GoodsdocInLogisticEntity> getGoodsdocInLogisticList(GoodsdocInLogisticEntity logisEntity) {
return (List<GoodsdocInLogisticEntity>) selectList("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInLogisticDaoImpl.entity_list_base", logisEntity);
}
@DS("jeckYun")
@Override
public GoodsdocInLogisticEntity saveLogisBak(GoodsdocInLogisticEntity logis) {
return super.save("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInLogisticDaoImpl.entity_insert_bak",logis);
}
@DS("jeckYun")
@Override
public int deleteByMainId(GoodsdocInLogisticEntity logisEntity) {
return super.delete("com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInLogisticDaoImpl.entity_delete",logisEntity.getMainId());
}
}

View File

@ -0,0 +1,568 @@
package com.hzya.frame.Jackyun.goodsdocin.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.util.List;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
public class GoodsdocInDetailEntity extends BaseEntity {
/** 入库单明细ID */
private Integer recId;
/** 货品ID */
private String goodsId;
/** 货品编号 */
private String goodsNo;
/** 货品名称 */
private String goodsName;
/** 规格ID */
private String skuId;
/** 规格名称 */
private String skuName;
/** 条码 */
private String skuBarcode;
/** 单位 */
private String unitName;
/** 单价 */
private String cuPrice;
/** 金额 */
private String cuValue;
/** 箱号 */
private String caseNumber;
/** 明细备注 */
private String rowRemark;
/** 辅助单位显示 */
private String assistUnit;
/** 含税金额 */
private String estCost;
/** 税额 */
private String estTax;
/** 含税单价 */
private String estPrice;
/** 含税单价 */
private String estPriceNoTax;
/** 无税金额 */
private String estCostNoTax;
/** 税率 */
private String taxRate;
/** 批次编号 */
private String batchNo;
/** 序列号 */
private String serialNo;
/** 生产日期 */
private String productionDate;
/** 到期日期 */
private String expirationDate;
/** 质保期 */
private String shelfLife;
/** 质保期单位 */
private String shelfLiftUnit;
/** 来源单据明细Id */
private String sourceDetailId;
/** 无税单价(原币种) */
private String transNoTaxPrice;
/** 无税金额(原币种) */
private String transNoTaxAmount;
/** 含税单价(原币种) */
private String transHasTaxPrice;
/**
含税金额原币种 */
private String transHasTaxAmount;
/** 税额(原币种) */
private String transTaxAmount;
/** 自定义字段1 */
private String detailField1;
/** 自定义字段2 */
private String detailField2;
/** 自定义字段3 */
private String detailField3;
/** 自定义字段4 */
private String detailField4;
/** 自定义字段5 */
private String detailField5;
/** 是否正品0-否1-是 */
private String isCertified;
/** 批准文号 */
private String registrationNumber;
/**
批文有效期 */
private String approvalDate;
/** 生产单位 */
private String productionDepart;
/** 生产批号 */
private String batchNumber;
/** 数量 */
private String quantity;
/** 采购单号 */
private String orderNum;
/** 出库唯一码关联字段,此值不为空时,需要查询接口获取唯一码信息:erp.storage.goodsdocserial */
private String serialSourceId;
private String mainId;
private List<GoodsdocInEntity>goodsdocInEntityList;
public List<GoodsdocInEntity> getGoodsdocInEntityList() {
return goodsdocInEntityList;
}
public void setGoodsdocInEntityList(List<GoodsdocInEntity> goodsdocInEntityList) {
this.goodsdocInEntityList = goodsdocInEntityList;
}
public String getMainId() {
return mainId;
}
public void setMainId(String mainId) {
this.mainId = mainId;
}
/** 入库单明细ID */
public void setRecId(Integer recId) {
this.recId = recId;
}
/** 入库单明细ID */
public Integer getRecId() {
return recId;
}
/** 货品ID */
public void setGoodsId(String goodsId) {
this.goodsId = goodsId;
}
/** 货品ID */
public String getGoodsId() {
return goodsId;
}
/** 货品编号 */
public void setGoodsNo(String goodsNo) {
this.goodsNo = goodsNo;
}
/** 货品编号 */
public String getGoodsNo() {
return goodsNo;
}
/** 货品名称 */
public void setGoodsName(String goodsName) {
this.goodsName = goodsName;
}
/** 货品名称 */
public String getGoodsName() {
return goodsName;
}
/** 规格ID */
public void setSkuId(String skuId) {
this.skuId = skuId;
}
/** 规格ID */
public String getSkuId() {
return skuId;
}
/** 规格名称 */
public void setSkuName(String skuName) {
this.skuName = skuName;
}
/** 规格名称 */
public String getSkuName() {
return skuName;
}
/** 条码 */
public void setSkuBarcode(String skuBarcode) {
this.skuBarcode = skuBarcode;
}
/** 条码 */
public String getSkuBarcode() {
return skuBarcode;
}
/** 单位 */
public void setUnitName(String unitName) {
this.unitName = unitName;
}
/** 单位 */
public String getUnitName() {
return unitName;
}
/** 单价 */
public void setCuPrice(String cuPrice) {
this.cuPrice = cuPrice;
}
/** 单价 */
public String getCuPrice() {
return cuPrice;
}
/** 金额 */
public void setCuValue(String cuValue) {
this.cuValue = cuValue;
}
/** 金额 */
public String getCuValue() {
return cuValue;
}
/** 箱号 */
public void setCaseNumber(String caseNumber) {
this.caseNumber = caseNumber;
}
/** 箱号 */
public String getCaseNumber() {
return caseNumber;
}
/** 明细备注 */
public void setRowRemark(String rowRemark) {
this.rowRemark = rowRemark;
}
/** 明细备注 */
public String getRowRemark() {
return rowRemark;
}
/** 辅助单位显示 */
public void setAssistUnit(String assistUnit) {
this.assistUnit = assistUnit;
}
/** 辅助单位显示 */
public String getAssistUnit() {
return assistUnit;
}
/** 含税金额 */
public void setEstCost(String estCost) {
this.estCost = estCost;
}
/** 含税金额 */
public String getEstCost() {
return estCost;
}
/** 税额 */
public void setEstTax(String estTax) {
this.estTax = estTax;
}
/** 税额 */
public String getEstTax() {
return estTax;
}
/** 含税单价 */
public void setEstPrice(String estPrice) {
this.estPrice = estPrice;
}
/** 含税单价 */
public String getEstPrice() {
return estPrice;
}
/** 含税单价 */
public void setEstPriceNoTax(String estPriceNoTax) {
this.estPriceNoTax = estPriceNoTax;
}
/** 含税单价 */
public String getEstPriceNoTax() {
return estPriceNoTax;
}
/** 无税金额 */
public void setEstCostNoTax(String estCostNoTax) {
this.estCostNoTax = estCostNoTax;
}
/** 无税金额 */
public String getEstCostNoTax() {
return estCostNoTax;
}
/** 税率 */
public void setTaxRate(String taxRate) {
this.taxRate = taxRate;
}
/** 税率 */
public String getTaxRate() {
return taxRate;
}
/** 批次编号 */
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
/** 批次编号 */
public String getBatchNo() {
return batchNo;
}
/** 序列号 */
public void setSerialNo(String serialNo) {
this.serialNo = serialNo;
}
/** 序列号 */
public String getSerialNo() {
return serialNo;
}
/** 生产日期 */
public void setProductionDate(String productionDate) {
this.productionDate = productionDate;
}
/** 生产日期 */
public String getProductionDate() {
return productionDate;
}
/** 到期日期 */
public void setExpirationDate(String expirationDate) {
this.expirationDate = expirationDate;
}
/** 到期日期 */
public String getExpirationDate() {
return expirationDate;
}
/** 质保期 */
public void setShelfLife(String shelfLife) {
this.shelfLife = shelfLife;
}
/** 质保期 */
public String getShelfLife() {
return shelfLife;
}
/** 质保期单位 */
public void setShelfLiftUnit(String shelfLiftUnit) {
this.shelfLiftUnit = shelfLiftUnit;
}
/** 质保期单位 */
public String getShelfLiftUnit() {
return shelfLiftUnit;
}
/** 来源单据明细Id */
public void setSourceDetailId(String sourceDetailId) {
this.sourceDetailId = sourceDetailId;
}
/** 来源单据明细Id */
public String getSourceDetailId() {
return sourceDetailId;
}
/** 无税单价(原币种) */
public void setTransNoTaxPrice(String transNoTaxPrice) {
this.transNoTaxPrice = transNoTaxPrice;
}
/** 无税单价(原币种) */
public String getTransNoTaxPrice() {
return transNoTaxPrice;
}
/** 无税金额(原币种) */
public void setTransNoTaxAmount(String transNoTaxAmount) {
this.transNoTaxAmount = transNoTaxAmount;
}
/** 无税金额(原币种) */
public String getTransNoTaxAmount() {
return transNoTaxAmount;
}
/** 含税单价(原币种) */
public void setTransHasTaxPrice(String transHasTaxPrice) {
this.transHasTaxPrice = transHasTaxPrice;
}
/** 含税单价(原币种) */
public String getTransHasTaxPrice() {
return transHasTaxPrice;
}
/**
含税金额原币种 */
public void setTransHasTaxAmount(String transHasTaxAmount) {
this.transHasTaxAmount = transHasTaxAmount;
}
/**
含税金额原币种 */
public String getTransHasTaxAmount() {
return transHasTaxAmount;
}
/** 税额(原币种) */
public void setTransTaxAmount(String transTaxAmount) {
this.transTaxAmount = transTaxAmount;
}
/** 税额(原币种) */
public String getTransTaxAmount() {
return transTaxAmount;
}
/** 自定义字段1 */
public void setDetailField1(String detailField1) {
this.detailField1 = detailField1;
}
/** 自定义字段1 */
public String getDetailField1() {
return detailField1;
}
/** 自定义字段2 */
public void setDetailField2(String detailField2) {
this.detailField2 = detailField2;
}
/** 自定义字段2 */
public String getDetailField2() {
return detailField2;
}
/** 自定义字段3 */
public void setDetailField3(String detailField3) {
this.detailField3 = detailField3;
}
/** 自定义字段3 */
public String getDetailField3() {
return detailField3;
}
/** 自定义字段4 */
public void setDetailField4(String detailField4) {
this.detailField4 = detailField4;
}
/** 自定义字段4 */
public String getDetailField4() {
return detailField4;
}
/** 自定义字段5 */
public void setDetailField5(String detailField5) {
this.detailField5 = detailField5;
}
/** 自定义字段5 */
public String getDetailField5() {
return detailField5;
}
/** 是否正品0-否1-是 */
public void setIsCertified(String isCertified) {
this.isCertified = isCertified;
}
/** 是否正品0-否1-是 */
public String getIsCertified() {
return isCertified;
}
/** 批准文号 */
public void setRegistrationNumber(String registrationNumber) {
this.registrationNumber = registrationNumber;
}
/** 批准文号 */
public String getRegistrationNumber() {
return registrationNumber;
}
/**
批文有效期 */
public void setApprovalDate(String approvalDate) {
this.approvalDate = approvalDate;
}
/**
批文有效期 */
public String getApprovalDate() {
return approvalDate;
}
/** 生产单位 */
public void setProductionDepart(String productionDepart) {
this.productionDepart = productionDepart;
}
/** 生产单位 */
public String getProductionDepart() {
return productionDepart;
}
/** 生产批号 */
public void setBatchNumber(String batchNumber) {
this.batchNumber = batchNumber;
}
/** 生产批号 */
public String getBatchNumber() {
return batchNumber;
}
/** 数量 */
public void setQuantity(String quantity) {
this.quantity = quantity;
}
/** 数量 */
public String getQuantity() {
return quantity;
}
/** 采购单号 */
public void setOrderNum(String orderNum) {
this.orderNum = orderNum;
}
/** 采购单号 */
public String getOrderNum() {
return orderNum;
}
/** 出库唯一码关联字段,此值不为空时,需要查询接口获取唯一码信息:erp.storage.goodsdocserial */
public void setSerialSourceId(String serialSourceId) {
this.serialSourceId = serialSourceId;
}
/** 出库唯一码关联字段,此值不为空时,需要查询接口获取唯一码信息:erp.storage.goodsdocserial */
public String getSerialSourceId() {
return serialSourceId;
}
}

View File

@ -0,0 +1,423 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDetailDaoImpl">
<resultMap id="get-entity-result" type="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity">
<!--入库单明细ID -->
<result property="recId" column="recId" />
<!--货品ID -->
<result property="goodsId" column="goodsId" />
<!--货品编号 -->
<result property="goodsNo" column="goodsNo" />
<!--货品名称 -->
<result property="goodsName" column="goodsName" />
<!--规格ID -->
<result property="skuId" column="skuId" />
<!--规格名称 -->
<result property="skuName" column="skuName" />
<!--条码 -->
<result property="skuBarcode" column="skuBarcode" />
<!--单位 -->
<result property="unitName" column="unitName" />
<!--单价 -->
<result property="cuPrice" column="cuPrice" />
<!--金额 -->
<result property="cuValue" column="cuValue" />
<!--箱号 -->
<result property="caseNumber" column="caseNumber" />
<!--明细备注 -->
<result property="rowRemark" column="rowRemark" />
<!--辅助单位显示 -->
<result property="assistUnit" column="assistUnit" />
<!--含税金额 -->
<result property="estCost" column="estCost" />
<!--税额 -->
<result property="estTax" column="estTax" />
<!--含税单价 -->
<result property="estPrice" column="estPrice" />
<!--含税单价 -->
<result property="estPriceNoTax" column="estPriceNoTax" />
<!--无税金额 -->
<result property="estCostNoTax" column="estCostNoTax" />
<!--税率 -->
<result property="taxRate" column="taxRate" />
<!--批次编号 -->
<result property="batchNo" column="batchNo" />
<!--序列号 -->
<result property="serialNo" column="serialNo" />
<!--生产日期 -->
<result property="productionDate" column="productionDate" />
<!--到期日期 -->
<result property="expirationDate" column="expirationDate" />
<!--质保期 -->
<result property="shelfLife" column="shelfLife" />
<!--质保期单位 -->
<result property="shelfLiftUnit" column="shelfLiftUnit" />
<!--来源单据明细Id -->
<result property="sourceDetailId" column="sourceDetailId" />
<!--无税单价(原币种) -->
<result property="transNoTaxPrice" column="transNoTaxPrice" />
<!--无税金额(原币种) -->
<result property="transNoTaxAmount" column="transNoTaxAmount" />
<!--含税单价(原币种) -->
<result property="transHasTaxPrice" column="transHasTaxPrice" />
<!--
含税金额(原币种) -->
<result property="transHasTaxAmount" column="transHasTaxAmount" />
<!--税额(原币种) -->
<result property="transTaxAmount" column="transTaxAmount" />
<!--自定义字段1 -->
<result property="detailField1" column="detailField1" />
<!--自定义字段2 -->
<result property="detailField2" column="detailField2" />
<!--自定义字段3 -->
<result property="detailField3" column="detailField3" />
<!--自定义字段4 -->
<result property="detailField4" column="detailField4" />
<!--自定义字段5 -->
<result property="detailField5" column="detailField5" />
<!--是否正品0-否1--->
<result property="isCertified" column="isCertified" />
<!--批准文号 -->
<result property="registrationNumber" column="registrationNumber" />
<!--
批文有效期 -->
<result property="approvalDate" column="approvalDate" />
<!--生产单位 -->
<result property="productionDepart" column="productionDepart" />
<!--生产批号 -->
<result property="batchNumber" column="batchNumber" />
<!--数量 -->
<result property="quantity" column="quantity" />
<!--采购单号 -->
<result property="orderNum" column="orderNum" />
<!--出库唯一码关联字段,此值不为空时,需要查询接口获取唯一码信息:erp.storage.goodsdocserial -->
<result property="serialSourceId" column="serialSourceId" />
</resultMap>
<sql id="GoodsdocInDetailEntity_Base_Column_List">
recId,
goodsId,
goodsNo,
goodsName,
skuId,
skuName,
skuBarcode,
unitName,
cuPrice,
cuValue,
caseNumber,
rowRemark,
assistUnit,
estCost,
estTax,
estPrice,
estPriceNoTax,
estCostNoTax,
taxRate,
batchNo,
serialNo,
productionDate,
expirationDate,
shelfLife,
shelfLiftUnit,
sourceDetailId,
transNoTaxPrice,
transNoTaxAmount,
transHasTaxPrice,
transHasTaxAmount,
transTaxAmount,
detailField1,
detailField2,
detailField3,
detailField4,
detailField5,
isCertified,
registrationNumber,
approvalDate,
productionDepart,
batchNumber,
quantity,
orderNum,
serialSourceId
</sql>
<!-- 查询 采用==查询 -->
<select id="entity_list_base_group" resultMap="get-entity-result" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity">
select
goodsNo,goodsName,unitName,
SUM(CAST(quantity AS DECIMAL(10, 6))) AS quantity,
SUM(CAST(transHasTaxAmount AS DECIMAL(10, 6))) AS transHasTaxAmount
from jeck_goodsdocin_details
where mainId in (
<foreach collection="goodsdocInEntityList" separator="," item="item">
<trim suffix="" suffixOverrides=",">
<if test="item.recId != null and item.recId !='' "> #{item.recId},</if>
</trim>
</foreach>
)
group by goodsNo,goodsName,unitName
</select>
<!-- 查询 采用==查询 -->
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity">
select
<include refid="GoodsdocInDetailEntity_Base_Column_List" />
from jeck_goodsdocin_details
<trim prefix="where" prefixOverrides="and">
<if test="recId != null ">recId=#{recId}</if>
<if test="goodsId != null and goodsId !='' "> and goodsId = #{goodsId}</if>
<if test="goodsNo != null and goodsNo !='' "> and goodsNo = #{goodsNo}</if>
<if test="goodsName != null and goodsName !='' "> and goodsName = #{goodsName}</if>
<if test="skuId != null and skuId !='' "> and skuId = #{skuId}</if>
<if test="skuName != null and skuName !='' "> and skuName = #{skuName}</if>
<if test="skuBarcode != null and skuBarcode !='' "> and skuBarcode = #{skuBarcode}</if>
<if test="unitName != null and unitName !='' "> and unitName = #{unitName}</if>
<if test="cuPrice != null and cuPrice !='' "> and cuPrice = #{cuPrice}</if>
<if test="cuValue != null and cuValue !='' "> and cuValue = #{cuValue}</if>
<if test="caseNumber != null and caseNumber !='' "> and caseNumber = #{caseNumber}</if>
<if test="rowRemark != null and rowRemark !='' "> and rowRemark = #{rowRemark}</if>
<if test="assistUnit != null and assistUnit !='' "> and assistUnit = #{assistUnit}</if>
<if test="estCost != null and estCost !='' "> and estCost = #{estCost}</if>
<if test="estTax != null and estTax !='' "> and estTax = #{estTax}</if>
<if test="estPrice != null and estPrice !='' "> and estPrice = #{estPrice}</if>
<if test="estPriceNoTax != null and estPriceNoTax !='' "> and estPriceNoTax = #{estPriceNoTax}</if>
<if test="estCostNoTax != null and estCostNoTax !='' "> and estCostNoTax = #{estCostNoTax}</if>
<if test="taxRate != null and taxRate !='' "> and taxRate = #{taxRate}</if>
<if test="batchNo != null and batchNo !='' "> and batchNo = #{batchNo}</if>
<if test="serialNo != null and serialNo !='' "> and serialNo = #{serialNo}</if>
<if test="productionDate != null and productionDate !='' "> and productionDate = #{productionDate}</if>
<if test="expirationDate != null and expirationDate !='' "> and expirationDate = #{expirationDate}</if>
<if test="shelfLife != null and shelfLife !='' "> and shelfLife = #{shelfLife}</if>
<if test="shelfLiftUnit != null and shelfLiftUnit !='' "> and shelfLiftUnit = #{shelfLiftUnit}</if>
<if test="sourceDetailId != null and sourceDetailId !='' "> and sourceDetailId = #{sourceDetailId}</if>
<if test="transNoTaxPrice != null and transNoTaxPrice !='' "> and transNoTaxPrice = #{transNoTaxPrice}</if>
<if test="transNoTaxAmount != null and transNoTaxAmount !='' "> and transNoTaxAmount = #{transNoTaxAmount}</if>
<if test="transHasTaxPrice != null and transHasTaxPrice !='' "> and transHasTaxPrice = #{transHasTaxPrice}</if>
<if test="transHasTaxAmount != null and transHasTaxAmount !='' "> and transHasTaxAmount = #{transHasTaxAmount}</if>
<if test="transTaxAmount != null and transTaxAmount !='' "> and transTaxAmount = #{transTaxAmount}</if>
<if test="detailField1 != null and detailField1 !='' "> and detailField1 = #{detailField1}</if>
<if test="detailField2 != null and detailField2 !='' "> and detailField2 = #{detailField2}</if>
<if test="detailField3 != null and detailField3 !='' "> and detailField3 = #{detailField3}</if>
<if test="detailField4 != null and detailField4 !='' "> and detailField4 = #{detailField4}</if>
<if test="detailField5 != null and detailField5 !='' "> and detailField5 = #{detailField5}</if>
<if test="isCertified != null and isCertified !='' "> and isCertified = #{isCertified}</if>
<if test="registrationNumber != null and registrationNumber !='' "> and registrationNumber = #{registrationNumber}</if>
<if test="approvalDate != null and approvalDate !='' "> and approvalDate = #{approvalDate}</if>
<if test="productionDepart != null and productionDepart !='' "> and productionDepart = #{productionDepart}</if>
<if test="batchNumber != null and batchNumber !='' "> and batchNumber = #{batchNumber}</if>
<if test="quantity != null and quantity !='' "> and quantity = #{quantity}</if>
<if test="orderNum != null and orderNum !='' "> and orderNum = #{orderNum}</if>
<if test="serialSourceId != null and serialSourceId !='' "> and serialSourceId = #{serialSourceId}</if>
<if test="mainId != null and mainId !='' "> and mainId = #{mainId}</if>
</trim>
</select>
<!--通过主键修改方法-->
<insert id="entity_insert" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity">
insert into jeck_goodsdocin_details(
<trim suffix="" suffixOverrides=",">
<if test="recId != null ">recId,</if>
<if test="goodsId != null and goodsId !='' "> goodsId, </if>
<if test="goodsNo != null and goodsNo !='' "> goodsNo, </if>
<if test="goodsName != null and goodsName !='' "> goodsName, </if>
<if test="skuId != null and skuId !='' "> skuId, </if>
<if test="skuName != null and skuName !='' "> skuName, </if>
<if test="skuBarcode != null and skuBarcode !='' "> skuBarcode, </if>
<if test="unitName != null and unitName !='' "> unitName, </if>
<if test="cuPrice != null and cuPrice !='' "> cuPrice, </if>
<if test="cuValue != null and cuValue !='' "> cuValue, </if>
<if test="caseNumber != null and caseNumber !='' "> caseNumber, </if>
<if test="rowRemark != null and rowRemark !='' "> rowRemark, </if>
<if test="assistUnit != null and assistUnit !='' "> assistUnit, </if>
<if test="estCost != null and estCost !='' "> estCost, </if>
<if test="estTax != null and estTax !='' "> estTax, </if>
<if test="estPrice != null and estPrice !='' "> estPrice, </if>
<if test="estPriceNoTax != null and estPriceNoTax !='' "> estPriceNoTax, </if>
<if test="estCostNoTax != null and estCostNoTax !='' "> estCostNoTax, </if>
<if test="taxRate != null and taxRate !='' "> taxRate, </if>
<if test="batchNo != null and batchNo !='' "> batchNo, </if>
<if test="serialNo != null and serialNo !='' "> serialNo, </if>
<if test="productionDate != null and productionDate !='' "> productionDate, </if>
<if test="expirationDate != null and expirationDate !='' "> expirationDate, </if>
<if test="shelfLife != null and shelfLife !='' "> shelfLife, </if>
<if test="shelfLiftUnit != null and shelfLiftUnit !='' "> shelfLiftUnit, </if>
<if test="sourceDetailId != null and sourceDetailId !='' "> sourceDetailId, </if>
<if test="transNoTaxPrice != null and transNoTaxPrice !='' "> transNoTaxPrice, </if>
<if test="transNoTaxAmount != null and transNoTaxAmount !='' "> transNoTaxAmount, </if>
<if test="transHasTaxPrice != null and transHasTaxPrice !='' "> transHasTaxPrice, </if>
<if test="transHasTaxAmount != null and transHasTaxAmount !='' "> transHasTaxAmount, </if>
<if test="transTaxAmount != null and transTaxAmount !='' "> transTaxAmount, </if>
<if test="detailField1 != null and detailField1 !='' "> detailField1, </if>
<if test="detailField2 != null and detailField2 !='' "> detailField2, </if>
<if test="detailField3 != null and detailField3 !='' "> detailField3, </if>
<if test="detailField4 != null and detailField4 !='' "> detailField4, </if>
<if test="detailField5 != null and detailField5 !='' "> detailField5, </if>
<if test="isCertified != null and isCertified !='' "> isCertified, </if>
<if test="registrationNumber != null and registrationNumber !='' "> registrationNumber, </if>
<if test="approvalDate != null and approvalDate !='' "> approvalDate, </if>
<if test="productionDepart != null and productionDepart !='' "> productionDepart, </if>
<if test="batchNumber != null and batchNumber !='' "> batchNumber, </if>
<if test="quantity != null and quantity !='' "> quantity, </if>
<if test="orderNum != null and orderNum !='' "> orderNum, </if>
<if test="serialSourceId != null and serialSourceId !='' "> serialSourceId, </if>
<if test="mainId != null and mainId !='' "> mainId </if>
</trim>
)values
(
<trim suffix="" suffixOverrides=",">
<if test="recId != null ">#{recId},</if>
<if test="goodsId != null and goodsId !='' "> #{goodsId}, </if>
<if test="goodsNo != null and goodsNo !='' "> #{goodsNo}, </if>
<if test="goodsName != null and goodsName !='' "> #{goodsName}, </if>
<if test="skuId != null and skuId !='' "> #{skuId}, </if>
<if test="skuName != null and skuName !='' "> #{skuName}, </if>
<if test="skuBarcode != null and skuBarcode !='' "> #{skuBarcode}, </if>
<if test="unitName != null and unitName !='' "> #{unitName}, </if>
<if test="cuPrice != null and cuPrice !='' "> #{cuPrice}, </if>
<if test="cuValue != null and cuValue !='' "> #{cuValue}, </if>
<if test="caseNumber != null and caseNumber !='' "> #{caseNumber}, </if>
<if test="rowRemark != null and rowRemark !='' "> #{rowRemark}, </if>
<if test="assistUnit != null and assistUnit !='' "> #{assistUnit}, </if>
<if test="estCost != null and estCost !='' "> #{estCost}, </if>
<if test="estTax != null and estTax !='' "> #{estTax}, </if>
<if test="estPrice != null and estPrice !='' "> #{estPrice}, </if>
<if test="estPriceNoTax != null and estPriceNoTax !='' "> #{estPriceNoTax}, </if>
<if test="estCostNoTax != null and estCostNoTax !='' "> #{estCostNoTax}, </if>
<if test="taxRate != null and taxRate !='' "> #{taxRate}, </if>
<if test="batchNo != null and batchNo !='' "> #{batchNo}, </if>
<if test="serialNo != null and serialNo !='' "> #{serialNo}, </if>
<if test="productionDate != null and productionDate !='' "> #{productionDate}, </if>
<if test="expirationDate != null and expirationDate !='' "> #{expirationDate}, </if>
<if test="shelfLife != null and shelfLife !='' "> #{shelfLife}, </if>
<if test="shelfLiftUnit != null and shelfLiftUnit !='' "> #{shelfLiftUnit}, </if>
<if test="sourceDetailId != null and sourceDetailId !='' "> #{sourceDetailId}, </if>
<if test="transNoTaxPrice != null and transNoTaxPrice !='' "> #{transNoTaxPrice}, </if>
<if test="transNoTaxAmount != null and transNoTaxAmount !='' "> #{transNoTaxAmount}, </if>
<if test="transHasTaxPrice != null and transHasTaxPrice !='' "> #{transHasTaxPrice}, </if>
<if test="transHasTaxAmount != null and transHasTaxAmount !='' "> #{transHasTaxAmount}, </if>
<if test="transTaxAmount != null and transTaxAmount !='' "> #{transTaxAmount}, </if>
<if test="detailField1 != null and detailField1 !='' "> #{detailField1}, </if>
<if test="detailField2 != null and detailField2 !='' "> #{detailField2}, </if>
<if test="detailField3 != null and detailField3 !='' "> #{detailField3}, </if>
<if test="detailField4 != null and detailField4 !='' "> #{detailField4}, </if>
<if test="detailField5 != null and detailField5 !='' "> #{detailField5}, </if>
<if test="isCertified != null and isCertified !='' "> #{isCertified}, </if>
<if test="registrationNumber != null and registrationNumber !='' "> #{registrationNumber}, </if>
<if test="approvalDate != null and approvalDate !='' "> #{approvalDate}, </if>
<if test="productionDepart != null and productionDepart !='' "> #{productionDepart}, </if>
<if test="batchNumber != null and batchNumber !='' "> #{batchNumber}, </if>
<if test="quantity != null and quantity !='' "> #{quantity}, </if>
<if test="orderNum != null and orderNum !='' "> #{orderNum}, </if>
<if test="serialSourceId != null and serialSourceId !='' "> #{serialSourceId}, </if>
<if test="mainId != null and mainId !='' "> #{mainId} </if>
</trim>
)
</insert>
<!--通过主键修改方法-->
<insert id="entity_insert_bak" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity">
insert into jeck_goodsdocin_details_bak(
<trim suffix="" suffixOverrides=",">
<if test="recId != null ">recId,</if>
<if test="goodsId != null and goodsId !='' "> goodsId, </if>
<if test="goodsNo != null and goodsNo !='' "> goodsNo, </if>
<if test="goodsName != null and goodsName !='' "> goodsName, </if>
<if test="skuId != null and skuId !='' "> skuId, </if>
<if test="skuName != null and skuName !='' "> skuName, </if>
<if test="skuBarcode != null and skuBarcode !='' "> skuBarcode, </if>
<if test="unitName != null and unitName !='' "> unitName, </if>
<if test="cuPrice != null and cuPrice !='' "> cuPrice, </if>
<if test="cuValue != null and cuValue !='' "> cuValue, </if>
<if test="caseNumber != null and caseNumber !='' "> caseNumber, </if>
<if test="rowRemark != null and rowRemark !='' "> rowRemark, </if>
<if test="assistUnit != null and assistUnit !='' "> assistUnit, </if>
<if test="estCost != null and estCost !='' "> estCost, </if>
<if test="estTax != null and estTax !='' "> estTax, </if>
<if test="estPrice != null and estPrice !='' "> estPrice, </if>
<if test="estPriceNoTax != null and estPriceNoTax !='' "> estPriceNoTax, </if>
<if test="estCostNoTax != null and estCostNoTax !='' "> estCostNoTax, </if>
<if test="taxRate != null and taxRate !='' "> taxRate, </if>
<if test="batchNo != null and batchNo !='' "> batchNo, </if>
<if test="serialNo != null and serialNo !='' "> serialNo, </if>
<if test="productionDate != null and productionDate !='' "> productionDate, </if>
<if test="expirationDate != null and expirationDate !='' "> expirationDate, </if>
<if test="shelfLife != null and shelfLife !='' "> shelfLife, </if>
<if test="shelfLiftUnit != null and shelfLiftUnit !='' "> shelfLiftUnit, </if>
<if test="sourceDetailId != null and sourceDetailId !='' "> sourceDetailId, </if>
<if test="transNoTaxPrice != null and transNoTaxPrice !='' "> transNoTaxPrice, </if>
<if test="transNoTaxAmount != null and transNoTaxAmount !='' "> transNoTaxAmount, </if>
<if test="transHasTaxPrice != null and transHasTaxPrice !='' "> transHasTaxPrice, </if>
<if test="transHasTaxAmount != null and transHasTaxAmount !='' "> transHasTaxAmount, </if>
<if test="transTaxAmount != null and transTaxAmount !='' "> transTaxAmount, </if>
<if test="detailField1 != null and detailField1 !='' "> detailField1, </if>
<if test="detailField2 != null and detailField2 !='' "> detailField2, </if>
<if test="detailField3 != null and detailField3 !='' "> detailField3, </if>
<if test="detailField4 != null and detailField4 !='' "> detailField4, </if>
<if test="detailField5 != null and detailField5 !='' "> detailField5, </if>
<if test="isCertified != null and isCertified !='' "> isCertified, </if>
<if test="registrationNumber != null and registrationNumber !='' "> registrationNumber, </if>
<if test="approvalDate != null and approvalDate !='' "> approvalDate, </if>
<if test="productionDepart != null and productionDepart !='' "> productionDepart, </if>
<if test="batchNumber != null and batchNumber !='' "> batchNumber, </if>
<if test="quantity != null and quantity !='' "> quantity, </if>
<if test="orderNum != null and orderNum !='' "> orderNum, </if>
<if test="serialSourceId != null and serialSourceId !='' "> serialSourceId, </if>
<if test="mainId != null and mainId !='' "> mainId </if>
</trim>
)values
(
<trim suffix="" suffixOverrides=",">
<if test="recId != null ">#{recId},</if>
<if test="goodsId != null and goodsId !='' "> #{goodsId}, </if>
<if test="goodsNo != null and goodsNo !='' "> #{goodsNo}, </if>
<if test="goodsName != null and goodsName !='' "> #{goodsName}, </if>
<if test="skuId != null and skuId !='' "> #{skuId}, </if>
<if test="skuName != null and skuName !='' "> #{skuName}, </if>
<if test="skuBarcode != null and skuBarcode !='' "> #{skuBarcode}, </if>
<if test="unitName != null and unitName !='' "> #{unitName}, </if>
<if test="cuPrice != null and cuPrice !='' "> #{cuPrice}, </if>
<if test="cuValue != null and cuValue !='' "> #{cuValue}, </if>
<if test="caseNumber != null and caseNumber !='' "> #{caseNumber}, </if>
<if test="rowRemark != null and rowRemark !='' "> #{rowRemark}, </if>
<if test="assistUnit != null and assistUnit !='' "> #{assistUnit}, </if>
<if test="estCost != null and estCost !='' "> #{estCost}, </if>
<if test="estTax != null and estTax !='' "> #{estTax}, </if>
<if test="estPrice != null and estPrice !='' "> #{estPrice}, </if>
<if test="estPriceNoTax != null and estPriceNoTax !='' "> #{estPriceNoTax}, </if>
<if test="estCostNoTax != null and estCostNoTax !='' "> #{estCostNoTax}, </if>
<if test="taxRate != null and taxRate !='' "> #{taxRate}, </if>
<if test="batchNo != null and batchNo !='' "> #{batchNo}, </if>
<if test="serialNo != null and serialNo !='' "> #{serialNo}, </if>
<if test="productionDate != null and productionDate !='' "> #{productionDate}, </if>
<if test="expirationDate != null and expirationDate !='' "> #{expirationDate}, </if>
<if test="shelfLife != null and shelfLife !='' "> #{shelfLife}, </if>
<if test="shelfLiftUnit != null and shelfLiftUnit !='' "> #{shelfLiftUnit}, </if>
<if test="sourceDetailId != null and sourceDetailId !='' "> #{sourceDetailId}, </if>
<if test="transNoTaxPrice != null and transNoTaxPrice !='' "> #{transNoTaxPrice}, </if>
<if test="transNoTaxAmount != null and transNoTaxAmount !='' "> #{transNoTaxAmount}, </if>
<if test="transHasTaxPrice != null and transHasTaxPrice !='' "> #{transHasTaxPrice}, </if>
<if test="transHasTaxAmount != null and transHasTaxAmount !='' "> #{transHasTaxAmount}, </if>
<if test="transTaxAmount != null and transTaxAmount !='' "> #{transTaxAmount}, </if>
<if test="detailField1 != null and detailField1 !='' "> #{detailField1}, </if>
<if test="detailField2 != null and detailField2 !='' "> #{detailField2}, </if>
<if test="detailField3 != null and detailField3 !='' "> #{detailField3}, </if>
<if test="detailField4 != null and detailField4 !='' "> #{detailField4}, </if>
<if test="detailField5 != null and detailField5 !='' "> #{detailField5}, </if>
<if test="isCertified != null and isCertified !='' "> #{isCertified}, </if>
<if test="registrationNumber != null and registrationNumber !='' "> #{registrationNumber}, </if>
<if test="approvalDate != null and approvalDate !='' "> #{approvalDate}, </if>
<if test="productionDepart != null and productionDepart !='' "> #{productionDepart}, </if>
<if test="batchNumber != null and batchNumber !='' "> #{batchNumber}, </if>
<if test="quantity != null and quantity !='' "> #{quantity}, </if>
<if test="orderNum != null and orderNum !='' "> #{orderNum}, </if>
<if test="serialSourceId != null and serialSourceId !='' "> #{serialSourceId}, </if>
<if test="mainId != null and mainId !='' "> #{mainId} </if>
</trim>
)
</insert>
<delete id="entity_delete" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity">
delete from jeck_goodsdocin_details where recId =#{recId}
</delete>
</mapper>

View File

@ -0,0 +1,679 @@
package com.hzya.frame.Jackyun.goodsdocin.entity;
import com.hzya.frame.web.entity.BaseEntity;
import java.util.List;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
public class GoodsdocInEntity extends BaseEntity {
/** 入库单ID */
private String recId;
/** 入库单号 */
private String goodsdocNo;
/** 上游单据号(关联单号) */
private String billNo;
/** 入库时间 */
private String inOutDate;
/**
创建时间 */
private String gmtCreate;
/** 入库类型(100-期初库存101-采购入库102-调拨入库103-盘盈入库104-其他入库105-销售退货106-完工入库107-组 */
private String inouttype;
/** 入库类型(100-期初库存101-采购入库102-调拨入库103-盘盈入库104-其他入库105-销售退货106-完工入库107-组 */
private String inouttypeName;
/** 标记id */
private String flagData;
/** 标记名称 */
private String flagDataName;
/** 往来单位编号 */
private String vendCustomerCode;
/** 往来单位名称 */
private String vendCustomerName;
/** 币种编号 */
private String currencyCode;
/** 币种汇率 */
private String currencyRate;
/** 业务员名字 */
private String userName;
/** 仓库编号 */
private String warehouseCode;
/** 仓库名字 */
private String warehouseName;
/** 备注 */
private String comment;
/** 收货备注 */
private String memo;
/** 物流公司 */
private String logisticName;
/** 物流单号 */
private String logisticNo;
/** 公司id */
private String companyId;
/** 公司名称 */
private String companyName;
/** 物流类型1-普通快递2-上门自提3-门店配送5-无需配送6-线下配送 */
private String logisticType;
/** 物流公司编码 */
private String logisticCode;
/** 入库原因 */
private String inOutReason;
/** 来源单号 */
private String sourceBillNo;
/** 渠道ID */
private String channelId;
/** 渠道编号 */
private String channelCode;
/** 渠道名称 */
private String channelName;
/**
红冲状态1蓝单未红冲2被冲蓝单9红冲单 */
private String redStatus;
/** 自定义字段1 */
private String field1;
/** 自定义字段2 */
private String field2;
/** 自定义字段3 */
private String field3;
/** 自定义字段4 */
private String field4;
/** 自定义字段5 */
private String field5;
/** <21是未成本核算>=21<30已成本核算>30不成本核算其中25表示财务过账。 */
private String financeBillStatus;
/** 申请人公司ID */
private String applyCompanyId;
/** 申请人公司名称 */
private String applyCompanyName;
/** 申请人公司编号 */
private String applyCompanyCode;
/** 申请部门id */
private String applyDepartId;
/** 申请人部门名称 */
private String applyDepartName;
/**
申请人部门编号 */
private String departCode;
/** 申请人id */
private String applyUserId;
/** 申请人名称 */
private String applyUserName;
/** 外部单号 */
private String outBillNo;
/** 修改日期 */
private String gmtModified;
/** 公司编号 */
private String companyCode;
/** 往来单位id */
private String vendCustomerId;
/** 收货单号 */
private String deliveryNo;
private String state;
private String u8BillCode;
private String accId;
public String getU8BillCode() {
return u8BillCode;
}
public void setU8BillCode(String u8BillCode) {
this.u8BillCode = u8BillCode;
}
public String getAccId() {
return accId;
}
public void setAccId(String accId) {
this.accId = accId;
}
private List<GoodsdocInEntity> groupList;
private List<GoodsdocInDetailEntity> goodsdocInDetailEntityList;
public List<GoodsdocInDetailEntity> getGoodsdocInDetailEntityList() {
return goodsdocInDetailEntityList;
}
public void setGoodsdocInDetailEntityList(List<GoodsdocInDetailEntity> goodsdocInDetailEntityList) {
this.goodsdocInDetailEntityList = goodsdocInDetailEntityList;
}
public List<GoodsdocInEntity> getGroupList() {
return groupList;
}
public void setGroupList(List<GoodsdocInEntity> groupList) {
this.groupList = groupList;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
private List<GoodsdocInLogisticEntity>logisticList;
private List<GoodsdocInDetailEntity>goodsDocDetailList;
public List<GoodsdocInLogisticEntity> getLogisticList() {
return logisticList;
}
public void setLogisticList(List<GoodsdocInLogisticEntity> logisticList) {
this.logisticList = logisticList;
}
public List<GoodsdocInDetailEntity> getGoodsDocDetailList() {
return goodsDocDetailList;
}
public void setGoodsDocDetailList(List<GoodsdocInDetailEntity> goodsDocDetailList) {
this.goodsDocDetailList = goodsDocDetailList;
}
/** 入库单ID */
public void setRecId(String recId) {
this.recId = recId;
}
/** 入库单ID */
public String getRecId() {
return recId;
}
/** 入库单号 */
public void setGoodsdocNo(String goodsdocNo) {
this.goodsdocNo = goodsdocNo;
}
/** 入库单号 */
public String getGoodsdocNo() {
return goodsdocNo;
}
/** 上游单据号(关联单号) */
public void setBillNo(String billNo) {
this.billNo = billNo;
}
/** 上游单据号(关联单号) */
public String getBillNo() {
return billNo;
}
/** 入库时间 */
public void setInOutDate(String inOutDate) {
this.inOutDate = inOutDate;
}
/** 入库时间 */
public String getInOutDate() {
return inOutDate;
}
/**
创建时间 */
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
/**
创建时间 */
public String getGmtCreate() {
return gmtCreate;
}
/** 入库类型(100-期初库存101-采购入库102-调拨入库103-盘盈入库104-其他入库105-销售退货106-完工入库107-组 */
public void setInouttype(String inouttype) {
this.inouttype = inouttype;
}
/** 入库类型(100-期初库存101-采购入库102-调拨入库103-盘盈入库104-其他入库105-销售退货106-完工入库107-组 */
public String getInouttype() {
return inouttype;
}
/** 入库类型(100-期初库存101-采购入库102-调拨入库103-盘盈入库104-其他入库105-销售退货106-完工入库107-组 */
public void setInouttypeName(String inouttypeName) {
this.inouttypeName = inouttypeName;
}
/** 入库类型(100-期初库存101-采购入库102-调拨入库103-盘盈入库104-其他入库105-销售退货106-完工入库107-组 */
public String getInouttypeName() {
return inouttypeName;
}
/** 标记id */
public void setFlagData(String flagData) {
this.flagData = flagData;
}
/** 标记id */
public String getFlagData() {
return flagData;
}
/** 标记名称 */
public void setFlagDataName(String flagDataName) {
this.flagDataName = flagDataName;
}
/** 标记名称 */
public String getFlagDataName() {
return flagDataName;
}
/** 往来单位编号 */
public void setVendCustomerCode(String vendCustomerCode) {
this.vendCustomerCode = vendCustomerCode;
}
/** 往来单位编号 */
public String getVendCustomerCode() {
return vendCustomerCode;
}
/** 往来单位名称 */
public void setVendCustomerName(String vendCustomerName) {
this.vendCustomerName = vendCustomerName;
}
/** 往来单位名称 */
public String getVendCustomerName() {
return vendCustomerName;
}
/** 币种编号 */
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
/** 币种编号 */
public String getCurrencyCode() {
return currencyCode;
}
/** 币种汇率 */
public void setCurrencyRate(String currencyRate) {
this.currencyRate = currencyRate;
}
/** 币种汇率 */
public String getCurrencyRate() {
return currencyRate;
}
/** 业务员名字 */
public void setUserName(String userName) {
this.userName = userName;
}
/** 业务员名字 */
public String getUserName() {
return userName;
}
/** 仓库编号 */
public void setWarehouseCode(String warehouseCode) {
this.warehouseCode = warehouseCode;
}
/** 仓库编号 */
public String getWarehouseCode() {
return warehouseCode;
}
/** 仓库名字 */
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
/** 仓库名字 */
public String getWarehouseName() {
return warehouseName;
}
/** 备注 */
public void setComment(String comment) {
this.comment = comment;
}
/** 备注 */
public String getComment() {
return comment;
}
/** 收货备注 */
public void setMemo(String memo) {
this.memo = memo;
}
/** 收货备注 */
public String getMemo() {
return memo;
}
/** 物流公司 */
public void setLogisticName(String logisticName) {
this.logisticName = logisticName;
}
/** 物流公司 */
public String getLogisticName() {
return logisticName;
}
/** 物流单号 */
public void setLogisticNo(String logisticNo) {
this.logisticNo = logisticNo;
}
/** 物流单号 */
public String getLogisticNo() {
return logisticNo;
}
/** 公司id */
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
/** 公司id */
public String getCompanyId() {
return companyId;
}
/** 公司名称 */
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
/** 公司名称 */
public String getCompanyName() {
return companyName;
}
/** 物流类型1-普通快递2-上门自提3-门店配送5-无需配送6-线下配送 */
public void setLogisticType(String logisticType) {
this.logisticType = logisticType;
}
/** 物流类型1-普通快递2-上门自提3-门店配送5-无需配送6-线下配送 */
public String getLogisticType() {
return logisticType;
}
/** 物流公司编码 */
public void setLogisticCode(String logisticCode) {
this.logisticCode = logisticCode;
}
/** 物流公司编码 */
public String getLogisticCode() {
return logisticCode;
}
/** 入库原因 */
public void setInOutReason(String inOutReason) {
this.inOutReason = inOutReason;
}
/** 入库原因 */
public String getInOutReason() {
return inOutReason;
}
/** 来源单号 */
public void setSourceBillNo(String sourceBillNo) {
this.sourceBillNo = sourceBillNo;
}
/** 来源单号 */
public String getSourceBillNo() {
return sourceBillNo;
}
/** 渠道ID */
public void setChannelId(String channelId) {
this.channelId = channelId;
}
/** 渠道ID */
public String getChannelId() {
return channelId;
}
/** 渠道编号 */
public void setChannelCode(String channelCode) {
this.channelCode = channelCode;
}
/** 渠道编号 */
public String getChannelCode() {
return channelCode;
}
/** 渠道名称 */
public void setChannelName(String channelName) {
this.channelName = channelName;
}
/** 渠道名称 */
public String getChannelName() {
return channelName;
}
/**
红冲状态1蓝单未红冲2被冲蓝单9红冲单 */
public void setRedStatus(String redStatus) {
this.redStatus = redStatus;
}
/**
红冲状态1蓝单未红冲2被冲蓝单9红冲单 */
public String getRedStatus() {
return redStatus;
}
/** 自定义字段1 */
public void setField1(String field1) {
this.field1 = field1;
}
/** 自定义字段1 */
public String getField1() {
return field1;
}
/** 自定义字段2 */
public void setField2(String field2) {
this.field2 = field2;
}
/** 自定义字段2 */
public String getField2() {
return field2;
}
/** 自定义字段3 */
public void setField3(String field3) {
this.field3 = field3;
}
/** 自定义字段3 */
public String getField3() {
return field3;
}
/** 自定义字段4 */
public void setField4(String field4) {
this.field4 = field4;
}
/** 自定义字段4 */
public String getField4() {
return field4;
}
/** 自定义字段5 */
public void setField5(String field5) {
this.field5 = field5;
}
/** 自定义字段5 */
public String getField5() {
return field5;
}
/** <21是未成本核算>=21<30已成本核算>30不成本核算其中25表示财务过账。 */
public void setFinanceBillStatus(String financeBillStatus) {
this.financeBillStatus = financeBillStatus;
}
/** <21是未成本核算>=21<30已成本核算>30不成本核算其中25表示财务过账。 */
public String getFinanceBillStatus() {
return financeBillStatus;
}
/** 申请人公司ID */
public void setApplyCompanyId(String applyCompanyId) {
this.applyCompanyId = applyCompanyId;
}
/** 申请人公司ID */
public String getApplyCompanyId() {
return applyCompanyId;
}
/** 申请人公司名称 */
public void setApplyCompanyName(String applyCompanyName) {
this.applyCompanyName = applyCompanyName;
}
/** 申请人公司名称 */
public String getApplyCompanyName() {
return applyCompanyName;
}
/** 申请人公司编号 */
public void setApplyCompanyCode(String applyCompanyCode) {
this.applyCompanyCode = applyCompanyCode;
}
/** 申请人公司编号 */
public String getApplyCompanyCode() {
return applyCompanyCode;
}
/** 申请部门id */
public void setApplyDepartId(String applyDepartId) {
this.applyDepartId = applyDepartId;
}
/** 申请部门id */
public String getApplyDepartId() {
return applyDepartId;
}
/** 申请人部门名称 */
public void setApplyDepartName(String applyDepartName) {
this.applyDepartName = applyDepartName;
}
/** 申请人部门名称 */
public String getApplyDepartName() {
return applyDepartName;
}
/**
申请人部门编号 */
public void setDepartCode(String departCode) {
this.departCode = departCode;
}
/**
申请人部门编号 */
public String getDepartCode() {
return departCode;
}
/** 申请人id */
public void setApplyUserId(String applyUserId) {
this.applyUserId = applyUserId;
}
/** 申请人id */
public String getApplyUserId() {
return applyUserId;
}
/** 申请人名称 */
public void setApplyUserName(String applyUserName) {
this.applyUserName = applyUserName;
}
/** 申请人名称 */
public String getApplyUserName() {
return applyUserName;
}
/** 外部单号 */
public void setOutBillNo(String outBillNo) {
this.outBillNo = outBillNo;
}
/** 外部单号 */
public String getOutBillNo() {
return outBillNo;
}
/** 修改日期 */
public void setGmtModified(String gmtModified) {
this.gmtModified = gmtModified;
}
/** 修改日期 */
public String getGmtModified() {
return gmtModified;
}
/** 公司编号 */
public void setCompanyCode(String companyCode) {
this.companyCode = companyCode;
}
/** 公司编号 */
public String getCompanyCode() {
return companyCode;
}
/** 往来单位id */
public void setVendCustomerId(String vendCustomerId) {
this.vendCustomerId = vendCustomerId;
}
/** 往来单位id */
public String getVendCustomerId() {
return vendCustomerId;
}
/** 收货单号 */
public void setDeliveryNo(String deliveryNo) {
this.deliveryNo = deliveryNo;
}
/** 收货单号 */
public String getDeliveryNo() {
return deliveryNo;
}
}

View File

@ -0,0 +1,465 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInDaoImpl">
<resultMap id="get-entity-result" type="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
<!--入库单ID -->
<result property="recId" column="recId" />
<!--入库单号 -->
<result property="goodsdocNo" column="goodsdocNo" />
<!--上游单据号(关联单号) -->
<result property="billNo" column="billNo" />
<!--入库时间 -->
<result property="inOutDate" column="inOutDate" />
<!--
创建时间 -->
<result property="gmtCreate" column="gmtCreate" />
<!--入库类型(100-期初库存101-采购入库102-调拨入库103-盘盈入库104-其他入库105-销售退货106-完工入库107--->
<result property="inouttype" column="inouttype" />
<!--入库类型(100-期初库存101-采购入库102-调拨入库103-盘盈入库104-其他入库105-销售退货106-完工入库107--->
<result property="inouttypeName" column="inouttypeName" />
<!--标记id -->
<result property="flagData" column="flagData" />
<!--标记名称 -->
<result property="flagDataName" column="flagDataName" />
<!--往来单位编号 -->
<result property="vendCustomerCode" column="vendCustomerCode" />
<!--往来单位名称 -->
<result property="vendCustomerName" column="vendCustomerName" />
<!--币种编号 -->
<result property="currencyCode" column="currencyCode" />
<!--币种汇率 -->
<result property="currencyRate" column="currencyRate" />
<!--业务员名字 -->
<result property="userName" column="userName" />
<!--仓库编号 -->
<result property="warehouseCode" column="warehouseCode" />
<!--仓库名字 -->
<result property="warehouseName" column="warehouseName" />
<!--备注 -->
<result property="comment" column="comment" />
<!--收货备注 -->
<result property="memo" column="memo" />
<!--物流公司 -->
<result property="logisticName" column="logisticName" />
<!--物流单号 -->
<result property="logisticNo" column="logisticNo" />
<!--公司id -->
<result property="companyId" column="companyId" />
<!--公司名称 -->
<result property="companyName" column="companyName" />
<!--物流类型1-普通快递2-上门自提3-门店配送5-无需配送6-线下配送 -->
<result property="logisticType" column="logisticType" />
<!--物流公司编码 -->
<result property="logisticCode" column="logisticCode" />
<!--入库原因 -->
<result property="inOutReason" column="inOutReason" />
<!--来源单号 -->
<result property="sourceBillNo" column="sourceBillNo" />
<!--渠道ID -->
<result property="channelId" column="channelId" />
<!--渠道编号 -->
<result property="channelCode" column="channelCode" />
<!--渠道名称 -->
<result property="channelName" column="channelName" />
<!--
红冲状态1蓝单未红冲2被冲蓝单9红冲单 -->
<result property="redStatus" column="redStatus" />
<!--自定义字段1 -->
<result property="field1" column="field1" />
<!--自定义字段2 -->
<result property="field2" column="field2" />
<!--自定义字段3 -->
<result property="field3" column="field3" />
<!--自定义字段4 -->
<result property="field4" column="field4" />
<!--自定义字段5 -->
<result property="field5" column="field5" />
<!--<21是未成本核算>=21<30已成本核算>30不成本核算其中25表示财务过账。 -->
<result property="financeBillStatus" column="financeBillStatus" />
<!--申请人公司ID -->
<result property="applyCompanyId" column="applyCompanyId" />
<!--申请人公司名称 -->
<result property="applyCompanyName" column="applyCompanyName" />
<!--申请人公司编号 -->
<result property="applyCompanyCode" column="applyCompanyCode" />
<!--申请部门id -->
<result property="applyDepartId" column="applyDepartId" />
<!--申请人部门名称 -->
<result property="applyDepartName" column="applyDepartName" />
<!--
申请人部门编号 -->
<result property="departCode" column="departCode" />
<!--申请人id -->
<result property="applyUserId" column="applyUserId" />
<!--申请人名称 -->
<result property="applyUserName" column="applyUserName" />
<!--外部单号 -->
<result property="outBillNo" column="outBillNo" />
<!--修改日期 -->
<result property="gmtModified" column="gmtModified" />
<!--公司编号 -->
<result property="companyCode" column="companyCode" />
<!--往来单位id -->
<result property="vendCustomerId" column="vendCustomerId" />
<!--收货单号 -->
<result property="deliveryNo" column="deliveryNo" />
<result property="u8BillCode" column="u8BillCode" />
<result property="accId" column="accId" />
</resultMap>
<sql id="GoodsdocInEntity_Base_Column_List">
recId,
goodsdocNo,
billNo,
inOutDate,
gmtCreate,
inouttype,
inouttypeName,
flagData,
flagDataName,
vendCustomerCode,
vendCustomerName,
currencyCode,
currencyRate,
userName,
warehouseCode,
warehouseName,
comment,
memo,
logisticName,
logisticNo,
companyId,
companyName,
logisticType,
logisticCode,
inOutReason,
sourceBillNo,
channelId,
channelCode,
channelName,
redStatus,
field1,
field2,
field3,
field4,
field5,
financeBillStatus,
applyCompanyId,
applyCompanyName,
applyCompanyCode,
applyDepartId,
applyDepartName,
departCode,
applyUserId,
applyUserName,
outBillNo,
gmtModified,
companyCode,
vendCustomerId,
u8BillCode,
accId,
deliveryNo
</sql>
<select id="entity_list_base_group" resultMap="get-entity-result" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
select
inouttypeName,
warehouseName,
'99999994' as channelName
from jeck_goodsdocin
where warehouseName = '退货仓'
and state is null
and goodsdocNo in (
<foreach collection="groupList" separator="," item="item">
<trim suffix="" suffixOverrides=",">
<if test="item.goodsdocNo != null and item.goodsdocNo !='' "> #{item.goodsdocNo},</if>
</trim>
</foreach>
)
group by inouttypeName,warehouseName
</select>
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
select
*
from jeck_goodsdocin where recId = #{recId}
</select>
<select id="entity_list_base_all" resultMap="get-entity-result" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
select
*
from jeck_goodsdocin where state is null
</select>
<select id="entity_list_base_bak" resultMap="get-entity-result" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
select
*
from jeck_goodsdocin where state = #{state}
</select>
<!--通过主键修改方法-->
<insert id="entity_insert" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
insert into jeck_goodsdocin(
<trim suffix="" suffixOverrides=",">
<if test="recId != null and recId !='' "> recId, </if>
<if test="goodsdocNo != null and goodsdocNo !='' "> goodsdocNo, </if>
<if test="billNo != null and billNo !='' "> billNo, </if>
<if test="inOutDate != null and inOutDate !='' "> inOutDate, </if>
<if test="gmtCreate != null and gmtCreate !='' "> gmtCreate, </if>
<if test="inouttype != null and inouttype !='' "> inouttype, </if>
<if test="inouttypeName != null and inouttypeName !='' "> inouttypeName, </if>
<if test="flagData != null and flagData !='' "> flagData, </if>
<if test="flagDataName != null and flagDataName !='' "> flagDataName, </if>
<if test="vendCustomerCode != null and vendCustomerCode !='' "> vendCustomerCode, </if>
<if test="vendCustomerName != null and vendCustomerName !='' "> vendCustomerName, </if>
<if test="currencyCode != null and currencyCode !='' "> currencyCode, </if>
<if test="currencyRate != null and currencyRate !='' "> currencyRate, </if>
<if test="userName != null and userName !='' "> userName, </if>
<if test="warehouseCode != null and warehouseCode !='' "> warehouseCode, </if>
<if test="warehouseName != null and warehouseName !='' "> warehouseName, </if>
<if test="comment != null and comment !='' "> comment, </if>
<if test="memo != null and memo !='' "> memo, </if>
<if test="logisticName != null and logisticName !='' "> logisticName, </if>
<if test="logisticNo != null and logisticNo !='' "> logisticNo, </if>
<if test="companyId != null and companyId !='' "> companyId, </if>
<if test="companyName != null and companyName !='' "> companyName, </if>
<if test="logisticType != null and logisticType !='' "> logisticType, </if>
<if test="logisticCode != null and logisticCode !='' "> logisticCode, </if>
<if test="inOutReason != null and inOutReason !='' "> inOutReason, </if>
<if test="sourceBillNo != null and sourceBillNo !='' "> sourceBillNo, </if>
<if test="channelId != null and channelId !='' "> channelId, </if>
<if test="channelCode != null and channelCode !='' "> channelCode, </if>
<if test="channelName != null and channelName !='' "> channelName, </if>
<if test="redStatus != null and redStatus !='' "> redStatus, </if>
<if test="field1 != null and field1 !='' "> field1, </if>
<if test="field2 != null and field2 !='' "> field2, </if>
<if test="field3 != null and field3 !='' "> field3, </if>
<if test="field4 != null and field4 !='' "> field4, </if>
<if test="field5 != null and field5 !='' "> field5, </if>
<if test="financeBillStatus != null and financeBillStatus !='' "> financeBillStatus, </if>
<if test="applyCompanyId != null and applyCompanyId !='' "> applyCompanyId, </if>
<if test="applyCompanyName != null and applyCompanyName !='' "> applyCompanyName, </if>
<if test="applyCompanyCode != null and applyCompanyCode !='' "> applyCompanyCode, </if>
<if test="applyDepartId != null and applyDepartId !='' "> applyDepartId, </if>
<if test="applyDepartName != null and applyDepartName !='' "> applyDepartName, </if>
<if test="departCode != null and departCode !='' "> departCode, </if>
<if test="applyUserId != null and applyUserId !='' "> applyUserId, </if>
<if test="applyUserName != null and applyUserName !='' "> applyUserName, </if>
<if test="outBillNo != null and outBillNo !='' "> outBillNo, </if>
<if test="gmtModified != null and gmtModified !='' "> gmtModified, </if>
<if test="companyCode != null and companyCode !='' "> companyCode, </if>
<if test="vendCustomerId != null and vendCustomerId !='' "> vendCustomerId, </if>
<if test="u8BillCode != null and u8BillCode !='' "> u8BillCode, </if>
<if test="accId != null and accId !='' "> accId, </if>
<if test="deliveryNo != null and deliveryNo !='' "> deliveryNo </if>
</trim>
)values
(
<trim suffix="" suffixOverrides=",">
<if test="recId != null and recId !='' "> #{recId}, </if>
<if test="goodsdocNo != null and goodsdocNo !='' "> #{goodsdocNo}, </if>
<if test="billNo != null and billNo !='' "> #{billNo}, </if>
<if test="inOutDate != null and inOutDate !='' "> #{inOutDate}, </if>
<if test="gmtCreate != null and gmtCreate !='' "> #{gmtCreate}, </if>
<if test="inouttype != null and inouttype !='' "> #{inouttype}, </if>
<if test="inouttypeName != null and inouttypeName !='' "> #{inouttypeName}, </if>
<if test="flagData != null and flagData !='' "> #{flagData}, </if>
<if test="flagDataName != null and flagDataName !='' "> #{flagDataName}, </if>
<if test="vendCustomerCode != null and vendCustomerCode !='' "> #{vendCustomerCode}, </if>
<if test="vendCustomerName != null and vendCustomerName !='' "> #{vendCustomerName}, </if>
<if test="currencyCode != null and currencyCode !='' "> #{currencyCode}, </if>
<if test="currencyRate != null and currencyRate !='' "> #{currencyRate}, </if>
<if test="userName != null and userName !='' "> #{userName}, </if>
<if test="warehouseCode != null and warehouseCode !='' "> #{warehouseCode}, </if>
<if test="warehouseName != null and warehouseName !='' "> #{warehouseName}, </if>
<if test="comment != null and comment !='' "> #{comment}, </if>
<if test="memo != null and memo !='' "> #{memo}, </if>
<if test="logisticName != null and logisticName !='' "> #{logisticName}, </if>
<if test="logisticNo != null and logisticNo !='' "> #{logisticNo}, </if>
<if test="companyId != null and companyId !='' "> #{companyId}, </if>
<if test="companyName != null and companyName !='' "> #{companyName}, </if>
<if test="logisticType != null and logisticType !='' "> #{logisticType}, </if>
<if test="logisticCode != null and logisticCode !='' "> #{logisticCode}, </if>
<if test="inOutReason != null and inOutReason !='' "> #{inOutReason}, </if>
<if test="sourceBillNo != null and sourceBillNo !='' "> #{sourceBillNo}, </if>
<if test="channelId != null and channelId !='' "> #{channelId}, </if>
<if test="channelCode != null and channelCode !='' "> #{channelCode}, </if>
<if test="channelName != null and channelName !='' "> #{channelName}, </if>
<if test="redStatus != null and redStatus !='' "> #{redStatus}, </if>
<if test="field1 != null and field1 !='' "> #{field1}, </if>
<if test="field2 != null and field2 !='' "> #{field2}, </if>
<if test="field3 != null and field3 !='' "> #{field3}, </if>
<if test="field4 != null and field4 !='' "> #{field4}, </if>
<if test="field5 != null and field5 !='' "> #{field5}, </if>
<if test="financeBillStatus != null and financeBillStatus !='' "> #{financeBillStatus}, </if>
<if test="applyCompanyId != null and applyCompanyId !='' "> #{applyCompanyId}, </if>
<if test="applyCompanyName != null and applyCompanyName !='' "> #{applyCompanyName}, </if>
<if test="applyCompanyCode != null and applyCompanyCode !='' "> #{applyCompanyCode}, </if>
<if test="applyDepartId != null and applyDepartId !='' "> #{applyDepartId}, </if>
<if test="applyDepartName != null and applyDepartName !='' "> #{applyDepartName}, </if>
<if test="departCode != null and departCode !='' "> #{departCode}, </if>
<if test="applyUserId != null and applyUserId !='' "> #{applyUserId}, </if>
<if test="applyUserName != null and applyUserName !='' "> #{applyUserName}, </if>
<if test="outBillNo != null and outBillNo !='' "> #{outBillNo}, </if>
<if test="gmtModified != null and gmtModified !='' "> #{gmtModified}, </if>
<if test="companyCode != null and companyCode !='' "> #{companyCode}, </if>
<if test="vendCustomerId != null and vendCustomerId !='' "> #{vendCustomerId}, </if>
<if test="u8BillCode != null and u8BillCode !='' "> #{u8BillCode}, </if>
<if test="accId != null and accId !='' "> #{accId}, </if>
<if test="deliveryNo != null and deliveryNo !='' "> #{deliveryNo} </if>
</trim>
)
</insert>
<!--通过主键修改方法-->
<insert id="entity_insert_bak" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
insert into jeck_goodsdocin_bak(
<trim suffix="" suffixOverrides=",">
<if test="recId != null and recId !='' "> recId, </if>
<if test="goodsdocNo != null and goodsdocNo !='' "> goodsdocNo, </if>
<if test="billNo != null and billNo !='' "> billNo, </if>
<if test="inOutDate != null and inOutDate !='' "> inOutDate, </if>
<if test="gmtCreate != null and gmtCreate !='' "> gmtCreate, </if>
<if test="inouttype != null and inouttype !='' "> inouttype, </if>
<if test="inouttypeName != null and inouttypeName !='' "> inouttypeName, </if>
<if test="flagData != null and flagData !='' "> flagData, </if>
<if test="flagDataName != null and flagDataName !='' "> flagDataName, </if>
<if test="vendCustomerCode != null and vendCustomerCode !='' "> vendCustomerCode, </if>
<if test="vendCustomerName != null and vendCustomerName !='' "> vendCustomerName, </if>
<if test="currencyCode != null and currencyCode !='' "> currencyCode, </if>
<if test="currencyRate != null and currencyRate !='' "> currencyRate, </if>
<if test="userName != null and userName !='' "> userName, </if>
<if test="warehouseCode != null and warehouseCode !='' "> warehouseCode, </if>
<if test="warehouseName != null and warehouseName !='' "> warehouseName, </if>
<if test="comment != null and comment !='' "> comment, </if>
<if test="memo != null and memo !='' "> memo, </if>
<if test="logisticName != null and logisticName !='' "> logisticName, </if>
<if test="logisticNo != null and logisticNo !='' "> logisticNo, </if>
<if test="companyId != null and companyId !='' "> companyId, </if>
<if test="companyName != null and companyName !='' "> companyName, </if>
<if test="logisticType != null and logisticType !='' "> logisticType, </if>
<if test="logisticCode != null and logisticCode !='' "> logisticCode, </if>
<if test="inOutReason != null and inOutReason !='' "> inOutReason, </if>
<if test="sourceBillNo != null and sourceBillNo !='' "> sourceBillNo, </if>
<if test="channelId != null and channelId !='' "> channelId, </if>
<if test="channelCode != null and channelCode !='' "> channelCode, </if>
<if test="channelName != null and channelName !='' "> channelName, </if>
<if test="redStatus != null and redStatus !='' "> redStatus, </if>
<if test="field1 != null and field1 !='' "> field1, </if>
<if test="field2 != null and field2 !='' "> field2, </if>
<if test="field3 != null and field3 !='' "> field3, </if>
<if test="field4 != null and field4 !='' "> field4, </if>
<if test="field5 != null and field5 !='' "> field5, </if>
<if test="financeBillStatus != null and financeBillStatus !='' "> financeBillStatus, </if>
<if test="applyCompanyId != null and applyCompanyId !='' "> applyCompanyId, </if>
<if test="applyCompanyName != null and applyCompanyName !='' "> applyCompanyName, </if>
<if test="applyCompanyCode != null and applyCompanyCode !='' "> applyCompanyCode, </if>
<if test="applyDepartId != null and applyDepartId !='' "> applyDepartId, </if>
<if test="applyDepartName != null and applyDepartName !='' "> applyDepartName, </if>
<if test="departCode != null and departCode !='' "> departCode, </if>
<if test="applyUserId != null and applyUserId !='' "> applyUserId, </if>
<if test="applyUserName != null and applyUserName !='' "> applyUserName, </if>
<if test="outBillNo != null and outBillNo !='' "> outBillNo, </if>
<if test="gmtModified != null and gmtModified !='' "> gmtModified, </if>
<if test="companyCode != null and companyCode !='' "> companyCode, </if>
<if test="vendCustomerId != null and vendCustomerId !='' "> vendCustomerId, </if>
<if test="u8BillCode != null and u8BillCode !='' "> u8BillCode, </if>
<if test="accId != null and accId !='' "> accId, </if>
<if test="deliveryNo != null and deliveryNo !='' "> deliveryNo </if>
</trim>
)values
(
<trim suffix="" suffixOverrides=",">
<if test="recId != null and recId !='' "> #{recId}, </if>
<if test="goodsdocNo != null and goodsdocNo !='' "> #{goodsdocNo}, </if>
<if test="billNo != null and billNo !='' "> #{billNo}, </if>
<if test="inOutDate != null and inOutDate !='' "> #{inOutDate}, </if>
<if test="gmtCreate != null and gmtCreate !='' "> #{gmtCreate}, </if>
<if test="inouttype != null and inouttype !='' "> #{inouttype}, </if>
<if test="inouttypeName != null and inouttypeName !='' "> #{inouttypeName}, </if>
<if test="flagData != null and flagData !='' "> #{flagData}, </if>
<if test="flagDataName != null and flagDataName !='' "> #{flagDataName}, </if>
<if test="vendCustomerCode != null and vendCustomerCode !='' "> #{vendCustomerCode}, </if>
<if test="vendCustomerName != null and vendCustomerName !='' "> #{vendCustomerName}, </if>
<if test="currencyCode != null and currencyCode !='' "> #{currencyCode}, </if>
<if test="currencyRate != null and currencyRate !='' "> #{currencyRate}, </if>
<if test="userName != null and userName !='' "> #{userName}, </if>
<if test="warehouseCode != null and warehouseCode !='' "> #{warehouseCode}, </if>
<if test="warehouseName != null and warehouseName !='' "> #{warehouseName}, </if>
<if test="comment != null and comment !='' "> #{comment}, </if>
<if test="memo != null and memo !='' "> #{memo}, </if>
<if test="logisticName != null and logisticName !='' "> #{logisticName}, </if>
<if test="logisticNo != null and logisticNo !='' "> #{logisticNo}, </if>
<if test="companyId != null and companyId !='' "> #{companyId}, </if>
<if test="companyName != null and companyName !='' "> #{companyName}, </if>
<if test="logisticType != null and logisticType !='' "> #{logisticType}, </if>
<if test="logisticCode != null and logisticCode !='' "> #{logisticCode}, </if>
<if test="inOutReason != null and inOutReason !='' "> #{inOutReason}, </if>
<if test="sourceBillNo != null and sourceBillNo !='' "> #{sourceBillNo}, </if>
<if test="channelId != null and channelId !='' "> #{channelId}, </if>
<if test="channelCode != null and channelCode !='' "> #{channelCode}, </if>
<if test="channelName != null and channelName !='' "> #{channelName}, </if>
<if test="redStatus != null and redStatus !='' "> #{redStatus}, </if>
<if test="field1 != null and field1 !='' "> #{field1}, </if>
<if test="field2 != null and field2 !='' "> #{field2}, </if>
<if test="field3 != null and field3 !='' "> #{field3}, </if>
<if test="field4 != null and field4 !='' "> #{field4}, </if>
<if test="field5 != null and field5 !='' "> #{field5}, </if>
<if test="financeBillStatus != null and financeBillStatus !='' "> #{financeBillStatus}, </if>
<if test="applyCompanyId != null and applyCompanyId !='' "> #{applyCompanyId}, </if>
<if test="applyCompanyName != null and applyCompanyName !='' "> #{applyCompanyName}, </if>
<if test="applyCompanyCode != null and applyCompanyCode !='' "> #{applyCompanyCode}, </if>
<if test="applyDepartId != null and applyDepartId !='' "> #{applyDepartId}, </if>
<if test="applyDepartName != null and applyDepartName !='' "> #{applyDepartName}, </if>
<if test="departCode != null and departCode !='' "> #{departCode}, </if>
<if test="applyUserId != null and applyUserId !='' "> #{applyUserId}, </if>
<if test="applyUserName != null and applyUserName !='' "> #{applyUserName}, </if>
<if test="outBillNo != null and outBillNo !='' "> #{outBillNo}, </if>
<if test="gmtModified != null and gmtModified !='' "> #{gmtModified}, </if>
<if test="companyCode != null and companyCode !='' "> #{companyCode}, </if>
<if test="vendCustomerId != null and vendCustomerId !='' "> #{vendCustomerId}, </if>
<if test="u8BillCode != null and u8BillCode !='' "> #{u8BillCode}, </if>
<if test="accId != null and accId !='' "> #{accId}, </if>
<if test="deliveryNo != null and deliveryNo !='' "> #{deliveryNo} </if>
</trim>
)
</insert>
<!-- 修改 -->
<update id="entity_update" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
update jeck_goodsdocin set
<trim suffix="" suffixOverrides=",">
<if test="state != null and state !='' ">state= #{state} ,</if>
<if test="u8BillCode != null and u8BillCode !='' "> u8BillCode=#{u8BillCode}</if>
</trim>
where goodsdocNo in (
<foreach collection="groupList" separator="," item="item">
<trim suffix="" suffixOverrides=",">
<if test="item.goodsdocNo != null and item.goodsdocNo !='' "> #{item.goodsdocNo},</if>
</trim>
</foreach>
)
</update>
<!-- 物理删除 -->
<delete id="entity_delete" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
delete from jeck_goodsdocin where recId =#{recId}
</delete>
</mapper>

View File

@ -0,0 +1,88 @@
package com.hzya.frame.Jackyun.goodsdocin.entity;
import com.hzya.frame.web.entity.BaseEntity;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
public class GoodsdocInLogisticEntity extends BaseEntity {
/** 入库单号 */
private String docNo;
/** 物流单号 */
private String logisticNo;
/** 物流公司编码 */
private String logisticCode;
/** 物流公司名称 */
private String logisticName;
/**
物流类型,1-普通快递2-上门自提3-门店配送5-无需配送6-线下配送 */
private String logisticType;
private String mainId;
public String getMainId() {
return mainId;
}
public void setMainId(String mainId) {
this.mainId = mainId;
}
/** 入库单号 */
public void setDocNo(String docNo) {
this.docNo = docNo;
}
/** 入库单号 */
public String getDocNo() {
return docNo;
}
/** 物流单号 */
public void setLogisticNo(String logisticNo) {
this.logisticNo = logisticNo;
}
/** 物流单号 */
public String getLogisticNo() {
return logisticNo;
}
/** 物流公司编码 */
public void setLogisticCode(String logisticCode) {
this.logisticCode = logisticCode;
}
/** 物流公司编码 */
public String getLogisticCode() {
return logisticCode;
}
/** 物流公司名称 */
public void setLogisticName(String logisticName) {
this.logisticName = logisticName;
}
/** 物流公司名称 */
public String getLogisticName() {
return logisticName;
}
/**
物流类型,1-普通快递2-上门自提3-门店配送5-无需配送6-线下配送 */
public void setLogisticType(String logisticType) {
this.logisticType = logisticType;
}
/**
物流类型,1-普通快递2-上门自提3-门店配送5-无需配送6-线下配送 */
public String getLogisticType() {
return logisticType;
}
}

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzya.frame.Jackyun.goodsdocin.dao.impl.GoodsdocInLogisticDaoImpl">
<resultMap id="get-entity-result" type="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInLogisticEntity">
<!--主键id -->
<result property="id" column="id" />
<!--入库单号 -->
<result property="docNo" column="docNo" />
<!--物流单号 -->
<result property="logisticNo" column="logisticNo" />
<!--物流公司编码 -->
<result property="logisticCode" column="logisticCode" />
<!--物流公司名称 -->
<result property="logisticName" column="logisticName" />
<!--
物流类型,1-普通快递2-上门自提3-门店配送5-无需配送6-线下配送 -->
<result property="logisticType" column="logisticType" />
</resultMap>
<sql id="GoodsdocInLogisticEntity_Base_Column_List">
id,
docNo,
logisticNo,
logisticCode,
logisticName,
logisticType
</sql>
<select id="entity_list_base" resultMap="get-entity-result" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInLogisticEntity">
select
<include refid="GoodsdocInLogisticEntity_Base_Column_List" />
from jeck_goodsdocin_logistic
<trim prefix="where" prefixOverrides="and">
<if test="id != null and id !='' ">id = #{id} </if>
<if test="docNo != null and docNo !='' "> and docNo = #{docNo}</if>
<if test="logisticNo != null and logisticNo !='' "> and logisticNo = #{logisticNo}</if>
<if test="logisticCode != null and logisticCode !='' "> and logisticCode = #{logisticCode}</if>
<if test="logisticName != null and logisticName !='' "> and logisticName = #{logisticName}</if>
<if test="logisticType != null and logisticType !='' "> and logisticType = #{logisticType}</if>
<if test="mainId != null and mainId !='' "> and mainId = #{mainId}</if>
</trim>
</select>
<!--通过主键修改方法-->
<insert id="entity_insert" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInLogisticEntity">
insert into jeck_goodsdocin_logistic(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id !='' "> id, </if>
<if test="docNo != null and docNo !='' "> docNo, </if>
<if test="logisticNo != null and logisticNo !='' "> logisticNo, </if>
<if test="logisticCode != null and logisticCode !='' "> logisticCode, </if>
<if test="logisticName != null and logisticName !='' "> logisticName, </if>
<if test="logisticType != null and logisticType !='' "> logisticType, </if>
<if test="mainId != null and mainId !='' "> mainId </if>
</trim>
)values
(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id !='' "> #{id}, </if>
<if test="docNo != null and docNo !='' "> #{docNo}, </if>
<if test="logisticNo != null and logisticNo !='' "> #{logisticNo}, </if>
<if test="logisticCode != null and logisticCode !='' "> #{logisticCode}, </if>
<if test="logisticName != null and logisticName !='' "> #{logisticName}, </if>
<if test="logisticType != null and logisticType !='' "> #{logisticType}, </if>
<if test="mainId != null and mainId !='' "> #{mainId} </if>
</trim>
)
</insert>
<!--通过主键修改方法-->
<insert id="entity_insert_bak" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInLogisticEntity">
insert into jeck_goodsdocin_logistic_bak(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id !='' "> id, </if>
<if test="docNo != null and docNo !='' "> docNo, </if>
<if test="logisticNo != null and logisticNo !='' "> logisticNo, </if>
<if test="logisticCode != null and logisticCode !='' "> logisticCode, </if>
<if test="logisticName != null and logisticName !='' "> logisticName, </if>
<if test="logisticType != null and logisticType !='' "> logisticType, </if>
<if test="mainId != null and mainId !='' "> mainId </if>
</trim>
)values
(
<trim suffix="" suffixOverrides=",">
<if test="id != null and id !='' "> #{id}, </if>
<if test="docNo != null and docNo !='' "> #{docNo}, </if>
<if test="logisticNo != null and logisticNo !='' "> #{logisticNo}, </if>
<if test="logisticCode != null and logisticCode !='' "> #{logisticCode}, </if>
<if test="logisticName != null and logisticName !='' "> #{logisticName}, </if>
<if test="logisticType != null and logisticType !='' "> #{logisticType}, </if>
<if test="mainId != null and mainId !='' "> #{mainId} </if>
</trim>
)
</insert>
<!-- 物理删除 -->
<delete id="entity_delete" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInLogisticEntity">
delete from jeck_goodsdocin_logistic where recId =#{recId}
</delete>
</mapper>

View File

@ -0,0 +1,15 @@
package com.hzya.frame.Jackyun.goodsdocin.service;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
public interface IGoodsdocInDetaiService extends IBaseService<GoodsdocInDetailEntity,String> {
}

View File

@ -0,0 +1,17 @@
package com.hzya.frame.Jackyun.goodsdocin.service;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInLogisticEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
public interface IGoodsdocInLogisticService extends IBaseService<GoodsdocInLogisticEntity,String> {
}

View File

@ -0,0 +1,28 @@
package com.hzya.frame.Jackyun.goodsdocin.service;
import com.alibaba.fastjson.JSONObject;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity;
import com.hzya.frame.basedao.service.IBaseService;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
public interface IGoodsdocInService extends IBaseService<GoodsdocInEntity,String> {
/**
* @Content:获取吉客云入库单数据
* @Author 👻👻👻👻yqh👻👻👻👻
* @Date
* @Param
* @return
**/
void getJeckGoodsdocIn(JSONObject json);
void getJeckGoodsdocInBak(JSONObject requestJson);
void getJeckGoodsdocInToU8(JSONObject requestJson);
}

View File

@ -0,0 +1,23 @@
package com.hzya.frame.Jackyun.goodsdocin.service.impl;
import com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity;
import com.hzya.frame.Jackyun.goodsdocin.service.IGoodsdocInDetaiService;
import com.hzya.frame.basedao.service.impl.BaseService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Service;
/**
*
* @content 吉客云入库单
* @className: Administrator
* @author laborer
* @date 2025-03-27 15:33
*
*/
@Service(value = "GoodsdocInDetaiServiceImpl")
public class GoodsdocInDetaiServiceImpl extends BaseService<GoodsdocInDetailEntity,String> implements IGoodsdocInDetaiService {
Logger logger = LogManager.getLogger(getClass());
}

Some files were not shown because too many files have changed in this diff Show More