diff --git a/bgs-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml b/bgs-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml index b737aa8..7a5f56a 100644 --- a/bgs-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml +++ b/bgs-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml @@ -1,31 +1,48 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - select obj_id, location_code, location_name, localtion_type, location_describe, store_code, max_amount, used_amount, max_volume, used_volume, location_status, is_flag, remark, created_by, created_time, updated_by, updated_time from base_location_info + select obj_id, + location_code, + location_name, + localtion_type, + location_describe, + store_code, + max_amount, + used_amount, + max_volume, + used_volume, + location_status, + is_flag, + remark, + created_by, + created_time, + updated_by, + updated_time + from base_location_info @@ -50,13 +67,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from base_location_info t1 left join base_basket_info t2 on t1.remark = t2.basket_epc - and t1.location_code = #{locationCode} - and t1.location_name like concat('%', #{locationName}, '%') - and t1.localtion_type = #{localtionType} - and t1.store_code = #{storeCode} - and t1.location_status = #{locationStatus} - and t1.is_flag = #{isFlag} - and t1.updated_time between #{params.beginUpdatedTime} and #{params.endUpdatedTime} + and t1.location_code = #{locationCode} + and t1.location_name like concat('%', + #{locationName}, '%') + + and t1.localtion_type = #{localtionType} + and t1.store_code = #{storeCode} + and t1.location_status = #{locationStatus} + and t1.is_flag = #{isFlag} + + and t1.updated_time between #{params.beginUpdatedTime} and #{params.endUpdatedTime} + @@ -84,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" created_time, updated_by, updated_time, - + #{locationCode}, #{locationName}, @@ -102,7 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{createdTime}, #{updatedBy}, #{updatedTime}, - + @@ -129,7 +150,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from base_location_info where obj_id = #{objId} + delete + from base_location_info + where obj_id = #{objId} diff --git a/bgs-webapi/src/main/java/com/bgs/webapi/controller/ApiController.java b/bgs-webapi/src/main/java/com/bgs/webapi/controller/ApiController.java index 026be80..4adeb60 100644 --- a/bgs-webapi/src/main/java/com/bgs/webapi/controller/ApiController.java +++ b/bgs-webapi/src/main/java/com/bgs/webapi/controller/ApiController.java @@ -27,10 +27,11 @@ public class ApiController { @PostMapping("/bindingSubmit") public AjaxResult bindingSubmit(@RequestBody BindingSubmitBeen submitBeen) { List watBills = submitBeen.getWatBills(); + String user = submitBeen.getUser(); watBills.forEach(code -> { String epc = service.selectEpcByWaybill(code); if (epc == null) { - int i = service.insertLedgerBinding(submitBeen.getEpc(), code); + int i = service.insertLedgerBinding(submitBeen.getEpc(), code, user); } }); @@ -38,7 +39,6 @@ public class ApiController { } - @PostMapping("/findBindingList") public AjaxResult findBindingList(String epc) { List codes = service.findBindingList(epc); @@ -50,26 +50,36 @@ public class ApiController { @PostMapping("/deleteBindingList") public AjaxResult deleteBindingList(String epc) { int i = service.deleteBindingList(epc); - if (i>0) return AjaxResult.success("全部解绑成功"); + if (i > 0) return AjaxResult.success("全部解绑成功"); return AjaxResult.error(); } @PostMapping("/deleteBindingItem") public AjaxResult deleteBindingItem(String epc, String code) { - int i = service.deleteBindingItem(epc,code); - if (i==1) return AjaxResult.success("运单:" +code +"解绑成功"); + int i = service.deleteBindingItem(epc, code); + if (i == 1) return AjaxResult.success("运单:" + code + "解绑成功"); return AjaxResult.error(); } + @PostMapping("/blueToothSubmit") public AjaxResult blueToothSubmit(String locationCode, String hkCode) { - int i = service.blueToothSubmit(locationCode,hkCode); - if (i>0){ + int i = service.blueToothSubmit(locationCode, hkCode); + if (i > 0) { return AjaxResult.success(); } return AjaxResult.error("库位没有维护"); } + @PostMapping("/jion/select") + public AjaxResult jionSelect(String user) { + List list = service.jionSelect(user); + if (list == null || list.isEmpty()) return AjaxResult.error("账号无绑定记录"); + return AjaxResult.success(list); + } + + + /* @GetMapping("/getVersion") public String getVersion(){ APKVersion apkVersion=service.getVersion(); diff --git a/bgs-webapi/src/main/java/com/bgs/webapi/doman/BindingSubmitBeen.java b/bgs-webapi/src/main/java/com/bgs/webapi/doman/BindingSubmitBeen.java index 95f43c9..35c91ad 100644 --- a/bgs-webapi/src/main/java/com/bgs/webapi/doman/BindingSubmitBeen.java +++ b/bgs-webapi/src/main/java/com/bgs/webapi/doman/BindingSubmitBeen.java @@ -13,6 +13,15 @@ public class BindingSubmitBeen { private String number; private String weight; private List watBills; + private String user; + + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } public String getEpc() { return epc; diff --git a/bgs-webapi/src/main/java/com/bgs/webapi/mapper/ApiMapper.java b/bgs-webapi/src/main/java/com/bgs/webapi/mapper/ApiMapper.java index 6a67e6d..0f08644 100644 --- a/bgs-webapi/src/main/java/com/bgs/webapi/mapper/ApiMapper.java +++ b/bgs-webapi/src/main/java/com/bgs/webapi/mapper/ApiMapper.java @@ -14,7 +14,7 @@ public interface ApiMapper { String selectEpcByWaybill(String code); - int insertLedgerBinding(String epc, String code); + int insertLedgerBinding(String epc, String code,String user); @@ -25,4 +25,6 @@ public interface ApiMapper { int deleteBindingItem(String epc, String code); int blueToothSubmit(String locationCode, String hkCode); + + List jionSelect(String user); } diff --git a/bgs-webapi/src/main/java/com/bgs/webapi/service/ApiService.java b/bgs-webapi/src/main/java/com/bgs/webapi/service/ApiService.java index e99100b..304c637 100644 --- a/bgs-webapi/src/main/java/com/bgs/webapi/service/ApiService.java +++ b/bgs-webapi/src/main/java/com/bgs/webapi/service/ApiService.java @@ -23,8 +23,8 @@ public class ApiService { return mapper.selectEpcByWaybill(code); } - public int insertLedgerBinding(String epc, String code) { - return mapper.insertLedgerBinding(epc,code); + public int insertLedgerBinding(String epc, String code, String user) { + return mapper.insertLedgerBinding(epc,code,user); } @@ -43,4 +43,8 @@ public class ApiService { public int blueToothSubmit(String locationCode, String hkCode) { return mapper.blueToothSubmit(locationCode,hkCode); } + + public List jionSelect(String user) { + return mapper.jionSelect(user); + } } diff --git a/bgs-webapi/src/main/resources/mapper/ApiMapper.xml b/bgs-webapi/src/main/resources/mapper/ApiMapper.xml index 9c07ed5..cd859b4 100644 --- a/bgs-webapi/src/main/resources/mapper/ApiMapper.xml +++ b/bgs-webapi/src/main/resources/mapper/ApiMapper.xml @@ -2,12 +2,12 @@ - + - INSERT INTO ledger_instant_binding (cargo_frame_epc, waybill_number) VALUES (#{param1}, #{param2}); + INSERT INTO ledger_instant_binding (cargo_frame_epc, waybill_number,create_by) VALUES (#{param1}, #{param2},#{param3}); + select cargo_frame_epc from ledger_instant_binding where create_by = #{user} group by cargo_frame_epc; + \ No newline at end of file