hjg
2023-11-18 bb48edb3d9faaaeab0088151c86fc24137acdb08
科技装车
已修改5个文件
73 ■■■■■ 文件已修改
JavaSource/com/mandi/fendan/mapper/Fd_XSTDMXMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaSource/com/mandi/fendan/util/Contants.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaSource/com/mandi/webservice/service/IFdXSTDService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaSource/com/mandi/webservice/service/impl/FdXSTDService.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaSource/com/mandi/webservice/service/impl/InvoiceService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JavaSource/com/mandi/fendan/mapper/Fd_XSTDMXMapper.java
@@ -166,7 +166,7 @@
    })
    public List<Map> getHwList(String sdepartNo);
    // 义瑞LED显示 序号  车号  装车区  状态
    /** 义瑞、科技LED显示 序号  车号  装车区  状态 **/
    @Select({
            "select  bs.numberplates,businessNo,zcWz,firstzxhtime," ,
            "case WHEN EXISTS ( SELECT * FROM bussinessitems WHERE bussinessNo = x.businessNo ) THEN '在装'" ,
JavaSource/com/mandi/fendan/util/Contants.java
@@ -51,6 +51,8 @@
    //有可能变动的变量,切记不要写成final了,否则常量值编译到文件里面了;遇到一个final的问题,替换配置文件无效,很郁闷,原来是这里导致的问题;聪明反被聪明误;
    public static String msLedServiceAddr= "http://10.22.12.104:8080/APPService.asmx"; // 明晟装车 ABC区LED webservice
    public static String  yr_zcLedUrl = "http://10.4.12.97:8080/APPService.asmx"; // 义瑞LED 装车 webservice
    public static String  kj_zcLedUrl = "http://10.3.5.16:8080/APPService.asmx"; // 义瑞LED 装车 webservice
    //分单回写nc系统测试地址
//    public static String NCfdhx_url = "http://10.0.13.20:9090/api/Domain/mtcesb/servlet/PubAPIServlet";
    // 正式
JavaSource/com/mandi/webservice/service/IFdXSTDService.java
@@ -96,4 +96,6 @@
     * @param currPch
     */
    public void sendToYrLed(String currPch);
    public void sendToKjLed(String currPch);
}
JavaSource/com/mandi/webservice/service/impl/FdXSTDService.java
@@ -67,7 +67,7 @@
    public static Boolean refreshMsLedLock = false;
    public static Boolean refreshYrLedLock = false;
    public static Boolean refreshKjLedLock = false;
    @Override
    @Transactional(rollbackFor=Exception.class)
    public ObjectResult<Boolean> saveFd_xstd(String dataArr) throws Exception {
@@ -633,11 +633,9 @@
        if("08".equals(fdb.getSdepartNo())) {
            final String cph = currPch;
            ThreadPoolUtil.getInstance().execute(()->{
                Map scanCodeParamMap = new HashMap();
                scanCodeParamMap.put("pch",cph);
                Wxhtmethod.post(Contants.yr_scanCodeNoticeUrl, scanCodeParamMap);
                try {
                    synchronized (FdXSTDService.refreshYrLedLock) {
                        if (FdXSTDService.refreshYrLedLock) { // 系统繁忙
@@ -651,6 +649,25 @@
                } finally {
                    synchronized (FdXSTDService.refreshYrLedLock) {
                        FdXSTDService.refreshYrLedLock = false;
                    }
                }
            });
        } else if("04".equals(fdb.getSdepartNo())) { // 科技
            final String cph = currPch;
            ThreadPoolUtil.getInstance().execute(()->{
                try {
                    synchronized (FdXSTDService.refreshKjLedLock) {
                        if (FdXSTDService.refreshKjLedLock) { // 系统繁忙
                            return  ;
                        }
                        FdXSTDService.refreshKjLedLock = true;
                    }
                    sendToKjLed(cph);
                } catch (Exception e) {
                    log.error(e);
                } finally {
                    synchronized (FdXSTDService.refreshKjLedLock) {
                        FdXSTDService.refreshKjLedLock = false;
                    }
                }
            });
@@ -894,6 +911,32 @@
            Wxhtmethod.post(Contants.yr_zcLedUrl + "/SendLED",paramMap);
            log.info("yr_zcLedUrl: " + Contants.yr_zcLedUrl + ";title:" + strTitle + ",content:" + strContent);
    }
    @Override
    public void sendToKjLed(String currPch) {
        // 状态 一磅后,待装;PDA扫码 在装; 二次过磅后消失
        // 装车区 两个汉字加两个英文或数字
        String strTitle="序号  车号   装车区  状态\r\n";
        String strContent = "";
        String contentFormatStr = "%s   %s  %s   %s\r\n";
        List<Map> list = tdmxper.yRZcList("04");
        int index = 1;
        for (Map map : list) {
            String numberplates = (String) map.get("numberplates"); // 车牌号
            String zcWz = (String) map.get("zcWz"); // 装车位置
            if(StringUtils.isNotBlank(zcWz)) {
                zcWz = zcWz.substring(0,4);
            } else { // 空是6个位置
                zcWz = "      ";
            }
            String zcStatus = (String) map.get("zcStatus"); // 装车位置 在办/待办
            strContent += String.format(contentFormatStr, fillWithZero(index++), numberplates, zcWz, zcStatus);
        }
        Map paramMap = new HashMap();
        paramMap.put("strTitle",strTitle);
        paramMap.put("strContent",strContent);
        Wxhtmethod.post(Contants.kj_zcLedUrl + "/SendLED",paramMap);
        log.info("kj_zcLedUrl: " + Contants.kj_zcLedUrl + ";title:" + strTitle + ",content:" + strContent);
    }
    String fillWithZero(int str){
        String s;
JavaSource/com/mandi/webservice/service/impl/InvoiceService.java
@@ -398,7 +398,7 @@
                        FdXSTDService.refreshMsLedLock = false;
                    }
                }
            }else if ("08".equals(sdepartNo)) { // 义瑞
            } else if ("08".equals(sdepartNo)) { // 义瑞
                synchronized (FdXSTDService.refreshYrLedLock) {
                    if (FdXSTDService.refreshYrLedLock) { // 系统繁忙
                        return null;
@@ -415,6 +415,22 @@
                    }
                }
            }
        } else if ("04".equals(sdepartNo)) { // 科技
            synchronized (FdXSTDService.refreshYrLedLock) {
                if (FdXSTDService.refreshKjLedLock) { // 系统繁忙
                    return null;
                }
            }
            try {
                synchronized (FdXSTDService.refreshKjLedLock) {
                    FdXSTDService.refreshKjLedLock = true;
                }
                fdser.sendToKjLed(null);
            } finally {
                synchronized (FdXSTDService.refreshKjLedLock) {
                    FdXSTDService.refreshKjLedLock = false;
                }
            }
        }
        return null;
    }