jiazx0107@163.com
2023-05-31 aa963091956e9d3f9a4a0f1a19809f56344ba988
出入库优化-称重实现粮食产地
已修改17个文件
513 ■■■■■ 文件已修改
igds-basic/src/main/java/com/ld/igds/basic/controller/CommonController.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/common/CoreDicService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/common/impl/CoreDicDataServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/common/manager/CommonManager.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/common/mapper/DicDataMapper.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/com/ld/igds/inout/ApiInoutService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/java/models/igds.model.xml 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-core/src/main/resources/mapper/DicDataMapper.xml 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController2.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager2.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/m/dto/NoticeParam.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-inout/src/main/java/com/ld/igds/models/InoutNoticeIn.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/in-weight.js 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/style.css 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/static/admin/inout/weight.js 132 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-web/src/main/resources/templates/admin/inout/in-weight.html 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-basic/src/main/java/com/ld/igds/basic/controller/CommonController.java
@@ -11,6 +11,7 @@
import com.ld.igds.grain.dto.GrainData;
import com.ld.igds.inout.dto.InoutParam;
import com.ld.igds.models.Depot;
import com.ld.igds.models.DicArea;
import com.ld.igds.models.DicSysConf;
import com.ld.igds.util.ContextUtil;
import com.ld.igds.util.FilesUtil;
@@ -128,6 +129,19 @@
        return new PageResponse<>(RespCodeEnum.CODE_0000, listDepot);
    }
    /**
     * 获取行政区域
     *
     * @return
     */
    @RequestMapping("/page-dicArea")
    public PageResponse<Page<DicArea>> pageDicArea(@RequestBody BaseParam param) {
        Page<DicArea> list = commonManager.pageDicArea(param);
        return new PageResponse<>(RespCodeEnum.CODE_0000, list);
    }
    /**
     * 帮助页面跳转
     *
igds-core/src/main/java/com/ld/igds/common/CoreDicService.java
@@ -7,6 +7,7 @@
import com.ld.igds.common.dto.PosDto;
import com.ld.igds.data.BaseParam;
import com.ld.igds.data.Page;
import com.ld.igds.models.DicArea;
import com.ld.igds.models.DicSlogan;
/**
@@ -57,4 +58,12 @@
     */
    void delPosByBizId(PosDto posDto);
    /**
     * 获取行政区划
     * @param param
     * @return
     */
    List<DicArea> listDicArea(Page<DicArea> page,BaseParam param);
}
igds-core/src/main/java/com/ld/igds/common/impl/CoreDicDataServiceImpl.java
@@ -5,6 +5,7 @@
import com.ld.igds.common.mapper.DicDataMapper;
import com.ld.igds.data.BaseParam;
import com.ld.igds.data.Page;
import com.ld.igds.models.DicArea;
import com.ld.igds.models.DicSlogan;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -44,6 +45,11 @@
        dicDataMapper.delPosByBizId(posDto);
    }
    @Override
    public List<DicArea> listDicArea(Page<DicArea> page,BaseParam param) {
        return dicDataMapper.listDicArea(page,param);
    }
    @Override
    public List<PosDto> getPosByBizTag(String companyId, String bizTag) {
igds-core/src/main/java/com/ld/igds/common/manager/CommonManager.java
@@ -605,5 +605,15 @@
        return (String) redisUtil.get(key);
    }
    public Page<DicArea> pageDicArea(BaseParam param) {
        Page<DicArea> page = new Page<>(param.getPage(), param.getLimit());
        List<DicArea> list = coreDicService.listDicArea(page, param);
        page.setRecords(list);
        return page;
    }
}
igds-core/src/main/java/com/ld/igds/common/mapper/DicDataMapper.java
@@ -1,6 +1,9 @@
package com.ld.igds.common.mapper;
import com.ld.igds.common.dto.PosDto;
import com.ld.igds.data.BaseParam;
import com.ld.igds.data.Page;
import com.ld.igds.models.DicArea;
import com.ld.igds.models.DicSlogan;
import org.apache.ibatis.annotations.Param;
@@ -11,41 +14,50 @@
/**
 * 字典相关的核心处理
 *
 * @author jiazx
 *
 * @author jiazx
 */
public interface DicDataMapper {
    /**
     * 根据DTO中的信息,批量相关数据
     *
     * @param dto
     */
    void batchDelPos(@Param("dto") PosDto dto);
    /**
     * 根据DTO中的信息,批量相关数据
     *
     * @param dto
     */
    void batchDelPos(@Param("dto") PosDto dto);
    /**
     * 新增坐标信息
     * @param posDto
     */
    void addPos(@Param("dto")  PosDto posDto);
    /**
     * 新增坐标信息
     *
     * @param posDto
     */
    void addPos(@Param("dto") PosDto posDto);
    /**
     * 查询当前组织的标语
     * @param parameter
     * @return
     */
    DicSlogan getDicSlogan(@Param("param")Map<String,Object> parameter);
    /**
     * 查询当前组织的标语
     *
     * @param parameter
     * @return
     */
    DicSlogan getDicSlogan(@Param("param") Map<String, Object> parameter);
    void delPosByBizId(@Param("dto")  PosDto posDto);
    void delPosByBizId(@Param("dto") PosDto posDto);
    /**
     * 根据组织编码和 业务标签获取设备位置信息
     *
     * @param companyId
     * @param bizTag
     * @return
     */
    List<PosDto> getPosByBizTag(@Param("companyId") String companyId, @Param("bizTag") String bizTag);
    /**
     * 根据组织编码和 业务标签获取设备位置信息
     *
     * @param companyId
     * @param bizTag
     * @return
     */
    List<PosDto> getPosByBizTag(@Param("companyId") String companyId, @Param("bizTag") String bizTag);
    /**
     * 获取行政区域
     *
     * @param param
     * @return
     */
    List<DicArea> listDicArea(@Param("page") Page<DicArea> page, @Param("param") BaseParam param);
}
igds-core/src/main/java/com/ld/igds/inout/ApiInoutService.java
@@ -71,4 +71,7 @@
     */
    String noticeLed(ApiInoutData param);
}
igds-core/src/main/java/models/igds.model.xml
@@ -1095,32 +1095,6 @@
      <Property name="label">页面中的坐标</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtFoodOrigin">
    <Property name="creationType">com.ld.igds.models.DicFoodOrigin</Property>
    <PropertyDef name="id">
      <Property name="dataType">int</Property>
    </PropertyDef>
    <PropertyDef name="code">
      <Property></Property>
      <Property name="label">产地编码</Property>
    </PropertyDef>
    <PropertyDef name="name">
      <Property></Property>
      <Property name="label">产地名称</Property>
    </PropertyDef>
    <PropertyDef name="sort">
      <Property name="dataType">int</Property>
      <Property name="label">排序</Property>
    </PropertyDef>
    <PropertyDef name="simple">
      <Property></Property>
      <Property name="label">产地简拼</Property>
    </PropertyDef>
    <PropertyDef name="disabledTag">
      <Property></Property>
      <Property name="label">是否禁用</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtSecFire">
    <Property name="creationType">com.ld.igds.models.SecFire</Property>
    <PropertyDef name="id">
@@ -1288,6 +1262,18 @@
    <PropertyDef name="type">
      <Property name="label">类型</Property>
    </PropertyDef>
    <PropertyDef name="simple">
      <Property/>
      <Property name="label">简拼</Property>
    </PropertyDef>
    <PropertyDef name="disabledTag">
      <Property/>
      <Property name="label">是否禁用</Property>
    </PropertyDef>
    <PropertyDef name="remark">
      <Property/>
      <Property name="label">备注信息</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtFileData">
    <Property name="creationType">com.ld.igds.file.dto.FileData</Property>
igds-core/src/main/resources/mapper/DicDataMapper.xml
@@ -69,7 +69,7 @@
    <!-- 查询标语 -->
    <select id="getDicSlogan" resultType="com.ld.igds.models.DicSlogan"
        parameterType="java.util.Map">
            parameterType="java.util.Map">
        select
        *
        from D_DIC_SLOGAN g
@@ -82,6 +82,21 @@
            limit 1
        </where>
    </select>
    <!-- 获取区域列表 -->
    <select id="listDicArea" resultType="com.ld.igds.models.DicArea"
            parameterType="com.ld.igds.data.BaseParam">
        select
        CODE_ as code,
        NAME_ as name,
        TYPE_ as type,
        SIMPLE_ as simple
        from D_DIC_AREA
        <where>
            <if test="param.key != null">AND (NAME_ like "%"#{param.key}"%" OR SIMPLE_ like "%"#{param.key}"%" )</if>
        </where>
        order by CODE_
    </select>
</mapper>
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController.java
@@ -321,7 +321,6 @@
    /**
     * 出库登记
     *
     * @param sort 表示使用的出入库设备配套号,不传递默认为1
     * @return
     */
igds-inout/src/main/java/com/ld/igds/inout/controller/InoutController2.java
@@ -272,50 +272,24 @@
        return inoutManager2.pageInoutData(param);
    }
    /**
     * 2022年11月15日 暂停使用
     * 入库的往来单位下拉框 -- 从入库通知单或往来单位表中查询
     *
     * @param param 查询关键字可以是ID也可能是名称
     * @return
     @RequestMapping("/list-in-customer") public PageResponse<List<InoutCustomer>> listInCustomer(@RequestBody InoutParam param) {
     return inoutManager2.listCustomerIn(param);
     }
     */
    /**
     * 入库通知单-获取没有完成的通知单列表
     *
     * @return
     */
    @RequestMapping("/list-notice—in")
    @RequestMapping("/list-notice-in")
    public PageResponse<List<InoutNoticeIn>> listNoticeIn(@RequestBody NoticeParam param) {
        return inoutManager2.listNoticeIn(param);
    }
    /**
     *
     * 2022年11月15日 暂停使用
     * 出库的往来单位下拉框 -- 从出库通知单或往来单位表中查询
     *
     * @param param
     * @return
     @RequestMapping("/list-out-customer") public PageResponse<List<InoutCustomer>> listOutCustomer(
     @RequestBody InoutParam param) {
     return inoutManager2.listCustomerOut(param);
     }
     */
    /**
     * 出库通知单-获取没有完成的通知单列表
     *
     * @return
     */
    @RequestMapping("/list-notice—out")
    @RequestMapping("/list-notice-out")
    public PageResponse<List<InoutNoticeOut>> listNoticeOut(@RequestBody NoticeParam param) {
        return inoutManager2.listNoticeOut(param);
    }
igds-inout/src/main/java/com/ld/igds/inout/manager/InoutManager2.java
@@ -637,7 +637,6 @@
            param.setCompanyId(user.getCompanyId());
        }
        param.setDeptId(ContextUtil.subDeptId(user));
        param.setCompleteStatus(InoutConstant.COMPLETE_STATUS_NONE);
        List<InoutNoticeIn> list = inoutManagerService.listNoticeIn(param);
igds-inout/src/main/java/com/ld/igds/m/dto/NoticeParam.java
@@ -1,6 +1,9 @@
package com.ld.igds.m.dto;
import com.ld.igds.data.BaseParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
@@ -10,7 +13,8 @@
 * @author
 */
@Data
public class NoticeParam {
@EqualsAndHashCode(callSuper=false)
public class NoticeParam  extends BaseParam {
    private String id;
igds-inout/src/main/java/com/ld/igds/models/InoutNoticeIn.java
@@ -50,10 +50,6 @@
    @PropertyDef(label = "合同名称", description = "针对轮换粮食必填")
    private String contractName;
//    @Column(name = "PLAN_NAME_", length = 50)
//    @PropertyDef(label = "计划名称")
//    private String planName;
    @Column(name = "DEPOT_ID_", length = 50)
    @PropertyDef(label = "目标仓库")
    private String depotId;
igds-web/src/main/resources/static/admin/inout/in-weight.js
@@ -517,140 +517,4 @@
//显示质检信息
function showCheck() {
    alertError("调整");
}
// ---------------------------通知单-开始 -------------------//
// 弹出往来单位下拉框
function showNotice() {
    var index = layer.load();
    var param = {
        type: type
    };
    // 渲染往来单位列表
    table.render({
        elem: '#tableNotice',
        url: '../../basic/inout/list-notice—in',
        page: false,
        // skin : "nob",
        // size : 'sm',
        even: true,
        method: 'POST',
        contentType: "application/json;charset=UTF-8",
        cols: [[{
            field: 'name',
            title: '通知单名称',
            width: '15%'
        }, {
            field: 'customerName',
            title: '送货单位'
        }, {
            field: 'foodVarietyName',
            title: '粮食品种',
            width: '10%'
        }, {
            field: 'year',
            title: '年份',
            width: '8%'
        }, {
            field: 'unitName',
            title: '收货单位'
        }, {
            field: 'contractName',
            title: '所属合同'
        }]],
        where: param,
        parseData: function (res) {
            if ("0000" == res.code) {
                return {
                    "code": "0",
                    "msg": res.msg,
                    "data": res.data
                }
            } else {
                return {
                    "code": "1",
                    "msg": res.msg
                }
            }
        },
        done: function (res) {
            layer.close(index);
        }
    });
    //双击显示选中数据
    table.on('rowDouble(tableNotice)', function (obj) {
        var data = obj.data;
        form.val("form-data", {
            customerId: data.customerId,
            customerName: data.customerName,
            noticeId: data.id
        });
        // 关闭
        layer.closeAll();
    });
    // 弹出对话框
    layer.open({
        type: 1,
        offset: ['100px', '250px'],
        title: "入库通知单",
        area: ['900px', '600px'],
        shade: 0,
        content: $('#listNotice'),
        btn: 0,
        btn: ['取消'],
        yes: function () {
            layer.closeAll();
        },
        closeBtn: 0
    });
}
// ---------------------------通知单 -结束 -------------------//
//-------------------------道闸操作--------------------------//
function gateCtrl() {
    layer.open({
        type: 1,
        title: '设备操作-' + domSelectDevice.attr("name"),
        area: ['450px', '210px'],
        shade: 0,
        content: $('#control-gate'),
        btn: 0,
        closeBtn: 2
    });
}
function controlGate(targetStatus) {
    if (gateDto) {
        var data = {
            "companyId": companyId
            , "deptId": deptId
            , "bizType": type
            , "confId": gateDto.id
            , "targetStatus": targetStatus
            , "sort": gateDto.sort
        };
        $.ajax({
            type: "POST",
            url: "../../basic/inout/gate-ctrl",
            dataType: "json",
            contentType: "application/json;charset=UTF-8",
            data: JSON.stringify(data),
            success: function (result) {
                if (result.code != "0000") {
                    layer.msg("操作失败:" + result.msg);
                } else {
                    layer.msg("操作成功");
                }
            },
            error: function () {
                layer.alert("操作失败,请重新尝试!!");
            }
        });
    } else {
        layer.msg("没有获取到设备!");
    }
}
}
igds-web/src/main/resources/static/admin/inout/style.css
@@ -647,7 +647,7 @@
.kccz-czxx-wrap {
    padding-left: 24px;
    margin-top: 20px;
    /*margin-top: 20px;*/
}
.kccz-czxx-left .layui-form-item {
@@ -944,9 +944,14 @@
.line {
    flex: 1;
    height: 1px;
    background-color: #2ab5ad;
    background-color: #0e9aef;
}
.line-text {
    padding: 0 10px;
    color: #2ab5ad;
    color: #0e9aef;
}
.layui-layer-title{
    color: #FFF !important;
    background-color: #0e9aef !important;
}
igds-web/src/main/resources/static/admin/inout/weight.js
@@ -161,54 +161,103 @@
    });
}
/**
 * 弹出提醒框
 * @param msg 提醒信息
 * @param data 数据信息,可能为空
 */
function notify(msg, data) {
    if (data) {
        //赋值
        $("#resultMsg").text(msg);
        $("#resultUserName").text(data.userName);
        $("#resultPlateNum").text(data.plateNum);
        if ("IN" == data.type) {
            $("#resultType").text("入库-" + INOUT_PROGRESS_MSG(data.progress));
        } else {
            $("#resultType").text("出库-" + INOUT_PROGRESS_MSG(data.progress));
        }
        $("#resultIntelCard").text(data.intelCard);
        layer.open({
            type: 1,
            offset: ['150px', '200px'],
            area: '450px;',
            shade: 0.8,
            id: 'dialog_notify_info',
            btn: ['确定'],
            content: $('#dialog-from-notify'),
            yes: function (index) {
                layer.closeAll();
            }
        });
    } else {
        layer.alert(msg, {offset: ['300px', '300px']});
// ---------------------------通知单-开始 -------------------//
// 弹出往来单位下拉框
function showNotice() {
    var titleCustomer = "送货单位";
    var url = "../../basic/inout/list-notice-in";
    if ("OUT" == type) {
        titleCustomer = "收货单位";
        url = "../../basic/inout/list-notice-out"
    }
    var index = layer.load();
    var param = {
        type: type
    };
    console.log(url);
    table.render({
        elem: '#tableNotice',
        url: url,
        page: false,
        even: true,
        method: 'POST',
        contentType: "application/json;charset=UTF-8",
        cols: [[{
            field: 'name',
            title: '通知单名称',
            width: '15%'
        }, {
            field: 'customerName',
            title: titleCustomer
        }, {
            field: 'foodVarietyName',
            title: '粮食品种',
            width: '10%'
        }, {
            field: 'year',
            title: '年份',
            width: '8%'
        }, {
            field: 'depotName',
            title: "所涉仓库"
        }, {
            field: 'contractName',
            title: '所属合同'
        }]],
        where: param,
        parseData: function (res) {
            if ("0000" == res.code) {
                return {
                    "code": "0",
                    "msg": res.msg,
                    "data": res.data
                }
            } else {
                return {
                    "code": "1",
                    "msg": res.msg
                }
            }
        },
        done: function (res) {
            layer.close(index);
        }
    });
    //双击显示选中数据
    table.on('rowDouble(tableNotice)', function (obj) {
        var data = obj.data;
        form.val("form-data", {
            customerName: data.customerName,
            noticeId: data.id
        });
        layer.closeAll();
    });
    // 弹出对话框
    layer.open({
        type: 1,
        offset: ['100px', '250px'],
        title: "通知单列表(双击选中)",
        area: ['900px', '600px'],
        shade: 0,
        content: $('#listNotice'),
        btn: 0,
        btn: ['取消'],
        yes: function () {
            layer.closeAll();
        },
        closeBtn: 0
    });
}
// ---------------------------粮食产地 -开始 -------------------//
// 弹出往来单位下拉框
// ---------------------------粮食产地-开始 -------------------//
function showFoodLocation() {
    var index = layer.load();
    // 渲染往来单位列表
    table.render({
        elem: '#tableFoodLoaction',
        url: '../../basic/common/page-food-location',
        url: '../../basic/common/page-dicArea',
        page: false,
        // limit : limit,
        // skin : "nob",
        // size : 'sm',
        toolbar: '#toolbarFoodLocaton',
        even: true,
        method: 'POST',
@@ -254,6 +303,7 @@
        // 赋值
        form.val("form-data", {
            foodLocation: data.name,
            foodLocationId: data.code
        });
        // 关闭
        layer.closeAll();
@@ -279,7 +329,7 @@
function flushFoodLocation() {
    var key = $("#key2").val();
    table.reload('tableFoodLoaction', {
        url: "../../basic/common/page-food-location",
        url: "../../basic/common/page-dicArea",
        where: {
            key: key
        },
igds-web/src/main/resources/templates/admin/inout/in-weight.html
@@ -335,7 +335,8 @@
                                    <label class="layui-form-label color-red">皮重(空车)</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="emptyWeight" id="emptyWeight" autocomplete="off"
                                               placeholder="地磅自动带入" class="layui-input weight rkbk-search-input" disabled>
                                               placeholder="地磅自动带入" class="layui-input weight rkbk-search-input"
                                               disabled>
                                        <em
                                                class="kccz-data-dw">KG</em>
                                    </div>
@@ -360,7 +361,7 @@
                                    <div class="layui-input-block">
                                        <input type="text" name="customerName" placeholder="请选择"
                                               autocomplete="off" class="layui-input" disabled="disabled"> <em
                                            class="kccz-data-dw cursor" onclick="showNotice()">…</em>
                                            class="kccz-data-dw cursor" onclick="showNotice()">……</em>
                                    </div>
                                </div>
                            </div>
@@ -444,7 +445,8 @@
                                    <label class="layui-form-label color-red">粮食产地</label>
                                    <div class="layui-input-block">
                                        <input type="text" name="foodLocation" placeholder="请选择"
                                               autocomplete="off" class="layui-input">
                                               autocomplete="off" class="layui-input" disabled="disabled"> <em
                                            class="kccz-data-dw cursor" onclick="showFoodLocation()">……</em>
                                    </div>
                                </div>
                            </div>
@@ -767,21 +769,6 @@
        </tr>
        </tbody>
    </table>
</div>
<!-- 弹出框-道闸操作-->
<div class="layui-tab-content areation-center" id="control-gate"
     style="display: none;">
    <div class="layui-btn-container m10">
        <button class="rkbk-quick-btn layui-btn btn-violet"
                onClick="controlGate('OPEN')">
            <i><img th:src="@{../../static/images/icon-sm-fc.png}"/></i>开道闸
        </button>
        <button class="rkbk-quick-btn layui-btn btn-red"
                onClick="controlGate('CLOSE')">
            <i><img th:src="@{../../static/images/icon-sm-fc.png}"/></i>关道闸
        </button>
    </div>
</div>
<script type="text/html" id="toolbarFoodLocaton">