doc/¶©µ¥×´Ì¬»Øµ÷½Ó¿ÚÎĵµ.docxBinary files differ
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java
@@ -46,7 +46,6 @@ */ @RestController @RequestMapping("/system/order") //@DataSource(DataSourceType.SQLSERVER) public class ServiceOrderController extends BaseController { @Autowired private IServiceOrderService serviceOrderService; @@ -262,13 +261,20 @@ //æ¯ä»ä¿¡æ¯ // List<PayInfo> payInfoList = payInfoService.selectPayInfoByServiceOrdIDDt(orderDetail.getServiceOrdID()); //1016302788 List<PayInfo> payInfoList = payInfoService.selectPayInfoByServiceOrdIDDt("1016302788"); // List<PayInfo> payInfoList = payInfoService.selectPayInfoByServiceOrdIDDt(orderDetail.getServiceOrdID()); //æ£å¼ä½¿ç¨ List<PayInfo> payInfoList = payInfoService.selectPayInfoByServiceOrdIDDt("1016302788");//æµè¯ä½¿ç¨ //å ¶ä»ä¿¡æ¯ Map<String, Object> otherInfo = new HashMap<>(); //è¯ä»· otherInfo.put("serviceOrdVisit", Objects.toString(mingServiceOrder.getServiceOrdVisit(), "æ ")); otherInfo.put("serviceOrdVisit", Objects.toString(mingServiceOrder.getServiceOrdVisit(), "-")); //ç¥æ åæä¹¦ // List<String> imageUrls = dispatchOrdService.selectImageUrlsByDOrdIDDt(orderDetail.getServiceOrdID()); //æ£å¼ä½¿ç¨ List<String> imageUrls = new ArrayList<>();//æµè¯ä½¿ç¨ imageUrls.add("https://sys.966120.com.cn/upload/202505/3016127678_3VhEv_VVql2K6eM9tS9uXgKv8fm7vaKtrSFCiP0SraTgz2qe1isgvIuUrqSNv-XgEvdC5kFUxeyrn_wz8Mfc2Sg.jpg"); imageUrls.add("https://sys.966120.com.cn/upload/202505/3016127678_3cDOPpqc_fzEJ-dHz8lq5aIx3tsnmEtossC6F5VCi2vj6sBwkuzOx4g1RcsWnQ3XNua7COADksYI1rHnbizccOw.jpg"); otherInfo.put("imageUrls", imageUrls); //å票è·å Map<String, Object> invoiceInfo = payInfoService.selectLatestInvoiceInfo("1016302788"); ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -1,12 +1,10 @@ package com.ruoyi.quartz.task; import com.ruoyi.common.utils.HttpUtil; import com.ruoyi.system.domain.AOrderStatus; import com.ruoyi.system.domain.DispatchOrd; import com.ruoyi.system.domain.OrderStatusCallBackVo; import com.ruoyi.system.domain.TbOrders; import com.ruoyi.system.domain.*; import com.ruoyi.system.service.IAOrderStatusService; import com.ruoyi.system.service.IDispatchOrdService; import com.ruoyi.system.service.ISysClientAppService; import com.ruoyi.system.service.ITbOrdersService; import com.ruoyi.system.service.impl.SysUserServiceImpl; import org.slf4j.Logger; @@ -37,6 +35,9 @@ @Autowired private IDispatchOrdService dispatchOrdService; @Autowired private ISysClientAppService sysClientAppService; public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) { System.out.println(StringUtils.format("æ§è¡å¤åæ¹æ³ï¼ å符串类å{}ï¼å¸å°ç±»å{}ï¼é¿æ´å{}ï¼æµ®ç¹å{}ï¼æ´å½¢{}", s, b, l, d, i)); @@ -52,6 +53,9 @@ System.out.println("æ§è¡æ åæ¹æ³"); } /** * åè°æ¨éç¶æ */ public void ryOrderStatus() { try { List<AOrderStatus> orderStatusList = orderStatusService.selectAOrderStatusList(); @@ -62,7 +66,6 @@ for (AOrderStatus orderStatus : orderStatusList) { int count = tbOrdersService.checkServiceOrdIDExists(orderStatus.getServiceOrdID()); if (count > 0) { // orderStatusService.updateAOrderStatusFlag(orderStatus.getId()); System.out.println("æå¡è®¢åIDåå¨ï¼" + orderStatus.getServiceOrdID()); TbOrders tbOrders = tbOrdersService.selectTbOrdersByServiceOrdID(orderStatus.getServiceOrdID()); @@ -108,10 +111,13 @@ log.error("è·åè°åº¦åå¼å¸¸ï¼"+e.getMessage()); } SysClientApp clientApp = sysClientAppService.selectSysClientAppByAppId(1L); if(clientApp==null){ log.error("åè°å°åä¸åå¨"); return; } // 使ç¨è·åå°çææå¸æºå§å String callbackUrl = "http://localhost:8080/system/apitest/orderCallback"; String callbackUrl = clientApp.getCallbackUrl(); try { // æå»ºè¯·æ±åæ° Map<String, String> map = new HashMap<>(); @@ -123,25 +129,29 @@ map.put("driverMobile",driverMobiles.toString()); map.put("driverName", driverNames.toString()); // æå°è¯·æ±åæ° log.info("åéåè°è¯·æ±ï¼URL: " + callbackUrl); log.info("请æ±åæ°: " + map); // åé请æ±å¹¶è·åååº String response = HttpUtil.post(callbackUrl, map); // æå°ååºç»æ log.info("åè°ååºç»æ: " + response); // æ´æ°ç¶æ // orderStatusService.updateAOrderStatusFlag(orderStatus.getId()); // ç¬¬ä¸æ¬¡å°è¯ String response = sendCallback(callbackUrl, map); if (response == null) { // å¦æç¬¬ä¸æ¬¡å¤±è´¥ï¼çå¾ 3ç§åéè¯ Thread.sleep(3000); log.info("ç¬¬ä¸æ¬¡åè°å¤±è´¥ï¼åå¤éè¯"); response = sendCallback(callbackUrl, map); } if (response != null) { // æ´æ°ç¶æ log.info("åè°æ¨éæåï¼åæ°å¦ä¸ï¼"); map.forEach((key, value) -> log.info(" {} : {}", key, value)); orderStatusService.updateAOrderStatusFlag(orderStatus.getId()); } else { log.error("åè°è¯·æ±éè¯åä»ç¶å¤±è´¥"); orderStatusService.updateAOrderStatusFlag(orderStatus.getId()); } } catch (Exception e) { log.error("åè°è¯·æ±å¤±è´¥: " + e.getMessage()); // å¯ä»¥èèéè¯æºå¶æè è®°å½å¤±è´¥æ¥å¿ orderStatusService.updateAOrderStatusFlag(orderStatus.getId()); } } else { log.info("æå¡è®¢åIDä¸åå¨ï¼" + orderStatus.getServiceOrdID()); @@ -153,4 +163,24 @@ e.printStackTrace(); } } // æ°å¢åéåè°çæ¹æ³ private String sendCallback(String callbackUrl, Map<String, String> params) { try { // æå°è¯·æ±åæ° log.info("åéåè°è¯·æ±ï¼URL: " + callbackUrl); log.info("请æ±åæ°: " + params); // åé请æ±å¹¶è·åååº String response = HttpUtil.post(callbackUrl, params); // æå°ååºç»æ log.info("åè°ååºç»æ: " + response); return response; } catch (Exception e) { log.error("åè°è¯·æ±å¼å¸¸: " + e.getMessage()); return null; } } } ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientApp.java
@@ -52,6 +52,11 @@ private String minAppId; /** åè°å°å */ @Excel(name = "åè°å°å") private String callbackUrl; public Long getAppId() { return appId; @@ -125,6 +130,14 @@ this.minAppId = minAppId; } public String getCallbackUrl() { return callbackUrl; } public void setCallbackUrl(String callbackUrl) { this.callbackUrl = callbackUrl; } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) ruoyi-system/src/main/java/com/ruoyi/system/mapper/DispatchOrdMapper.java
@@ -51,4 +51,12 @@ * @return 叿ºææºå· */ public String selectDriverMobileByName(String driverName); /** * æ ¹æ®æ´¾å·¥åå·æ¥è¯¢å¾çURLå表 * * @param dOrdIDDt 派工åå· * @return å¾çURLå表 */ public List<String> selectImageUrlsByDOrdIDDt(String dOrdIDDt); } ruoyi-system/src/main/java/com/ruoyi/system/service/IDispatchOrdService.java
@@ -50,4 +50,12 @@ * @return 叿ºææºå· */ public String selectDriverMobileByName(String driverName); /** * æ ¹æ®æ´¾å·¥åå·æ¥è¯¢å¾çURLå表 * * @param dOrdIDDt 派工åå· * @return å¾çURLå表 */ public List<String> selectImageUrlsByDOrdIDDt(String dOrdIDDt); } ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DispatchOrdServiceImpl.java
@@ -76,4 +76,17 @@ public String selectDriverMobileByName(String driverName) { return dispatchOrdMapper.selectDriverMobileByName(driverName); } /** * æ ¹æ®æ´¾å·¥åå·æ¥è¯¢å¾çURLå表 * * @param dOrdIDDt 派工åå· * @return å¾çURLå表 */ @Override public List<String> selectImageUrlsByDOrdIDDt(String dOrdIDDt) { return dispatchOrdMapper.selectImageUrlsByDOrdIDDt(dOrdIDDt); } } ruoyi-system/src/main/resources/mapper/system/DispatchOrdMapper.xml
@@ -73,4 +73,14 @@ AND OA_Name = #{driverName} </select> <!-- æ ¹æ®æ´¾å·¥åå·æ¥è¯¢å¾çURLå表 --> <select id="selectImageUrlsByDOrdIDDt" parameterType="String" resultType="String"> select ImageUrl from ImageData where DOrdIDDt = #{dOrdIDDt} and ImageDel = 0 and ImageType in (1,2) order by UpImageTime desc </select> </mapper> ruoyi-system/src/main/resources/mapper/system/SysClientAppMapper.xml
@@ -19,10 +19,11 @@ <result property="updateTime" column="update_time" /> <result property="remark" column="remark" /> <result property="minAppId" column="min_app_id" /> <result property="callbackUrl" column="callback_url" /> </resultMap> <sql id="selectSysClientAppVo"> select app_id, client_name, app_key, security_key, valid_start_time, valid_end_time, status, del_flag, create_by, create_time, update_by, update_time, remark, min_app_id from sys_client_app select app_id, client_name, app_key, security_key, valid_start_time, valid_end_time, status, del_flag, create_by, create_time, update_by, update_time, remark, min_app_id, callback_url from sys_client_app </sql> <select id="selectSysClientAppList" parameterType="SysClientApp" resultMap="SysClientAppResult"> @@ -62,6 +63,7 @@ <if test="updateTime != null">update_time,</if> <if test="remark != null">remark,</if> <if test="minAppId != null">min_app_id,</if> <if test="callbackUrl != null">callback_url,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="clientName != null">#{clientName},</if> @@ -77,6 +79,7 @@ <if test="updateTime != null">#{updateTime},</if> <if test="remark != null">#{remark},</if> <if test="minAppId != null">#{minAppId},</if> <if test="callbackUrl != null">#{callbackUrl},</if> </trim> </insert> @@ -91,6 +94,7 @@ <if test="status != null and status != ''">status = #{status},</if> <if test="remark != null">remark = #{remark},</if> <if test="minAppId != null">min_app_id = #{minAppId},</if> <if test="callbackUrl != null">callback_url = #{callbackUrl},</if> <if test="updateBy != null">update_by = #{updateBy},</if> update_time = sysdate() </set> ruoyi-ui/src/views/system/clientApp/index.vue
@@ -102,6 +102,8 @@ <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> </template> </el-table-column> <el-table-column label="æ°èªåå ¬å¸Id" align="center" prop="minAppId" /> <el-table-column label="åè°å°å" align="center" prop="callbackUrl" /> <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button @@ -121,7 +123,7 @@ </template> </el-table-column> </el-table> <pagination v-show="total>0" :total="total" @@ -161,6 +163,12 @@ :label="dict.value" >{{dict.label}}</el-radio> </el-radio-group> </el-form-item> <el-form-item label="æ°èªåå ¬å¸Id" prop="minAppId"> <el-input v-model="form.minAppId" placeholder="请è¾å ¥æ°èªåå ¬å¸Id" /> </el-form-item> <el-form-item label="åè°å°å" prop="callbackUrl"> <el-input v-model="form.callbackUrl" placeholder="请è¾å ¥åè°å°å" /> </el-form-item> <el-form-item label="夿³¨" prop="remark"> <el-input v-model="form.remark" type="textarea" placeholder="请è¾å ¥å 容" /> @@ -316,7 +324,7 @@ if (this.form.validEndTime) { this.form.validEndTime = this.parseTime(this.form.validEndTime, '{y}-{m}-{d} {h}:{i}:{s}'); } if (this.form.appId != null) { updateClientApp(this.form).then(response => { this.$modal.msgSuccess("ä¿®æ¹æå"); @@ -361,4 +369,4 @@ } } }; </script> </script> ruoyi-ui/src/views/system/order/detail.vue
@@ -98,9 +98,9 @@ :size="isMobile ? 'mini' : 'medium'" class="responsive-table"> <el-table-column prop="id" label="æ¶æ¬¾æµæ°´" min-width="120" /> <el-table-column prop="paidMoneyTime" label="æ¶æ¬¾æ¶é´" <el-table-column prop="paidMoneyTime" label="æ¶æ¬¾æ¶é´" min-width="140" :formatter="(row, column, cellValue) => formatDateTime(cellValue)" /> @@ -112,7 +112,7 @@ </el-col> </el-row> <!-- è®¢åæ åµ --> <el-row :gutter="20"> <!-- è°åº¦ä¿¡æ¯ --> @@ -122,6 +122,18 @@ <el-descriptions :column="isMobile ? 1 : 2" border> <el-descriptions-item label="æå¡è¯ä»·">{{ otherInfo.serviceOrdVisit }}</el-descriptions-item> <el-descriptions-item label="åç¥¨ç¶æ">{{ otherInfo.invoiceStatus }}</el-descriptions-item> <el-descriptions-item label="ç¥æ åæä¹¦"> <div v-if="otherInfo.imageUrls && otherInfo.imageUrls.length > 0" class="image-container"> <el-image v-for="image in otherInfo.imageUrls" :key="image" :src="image" :preview-src-list="otherInfo.imageUrls" class="preview-image" /> </div> <span v-else>ææ å¾ç</span> </el-descriptions-item> </el-descriptions> </el-card> </el-col> @@ -225,4 +237,15 @@ .el-descriptions-item { padding: 8px !important; } .el-descriptions-item__label { width: 100px !important; } } .image-container { display: flex; flex-wrap: wrap; gap: 10px; } .preview-image { width: 100px; height: 100px; object-fit: cover; cursor: pointer; } </style>