| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustNewParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.OffSaleParam; |
| | | import com.zy.asrs.entity.result.MobileAdjustResult; |
| | | import com.zy.asrs.mapper.ManLocDetlMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.common.model.TaskDto; |
| | | import com.zy.common.model.WrkDto; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.system.entity.User; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | return R.ok(); |
| | | } |
| | | List<OrderDetl> orderDetls = orderService.selectWorkingDetls(order.getId()); |
| | | if (Cools.isEmpty(orderDetls)) { |
| | | ArrayList<OrderDetl> orderDetls2 = new ArrayList<>(); |
| | | for (OrderDetl orderDetl : orderDetls){ |
| | | orderDetl.setAnfme(new BigDecimal(orderDetl.getAnfme()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue()); |
| | | orderDetl.setWorkQty(new BigDecimal(orderDetl.getWorkQty()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue()); |
| | | orderDetl.setQty(new BigDecimal(orderDetl.getQty()).setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue()); |
| | | orderDetls2.add(orderDetl); |
| | | } |
| | | if (Cools.isEmpty(orderDetls) || Cools.isEmpty(orderDetls2)) { |
| | | return R.ok(); |
| | | } |
| | | return R.ok().add(orderDetls); |
| | | return R.ok().add(orderDetls2); |
| | | } |
| | | |
| | | @RequestMapping("/comb/auth") |
| | |
| | | return R.ok("盘点成功"); |
| | | } |
| | | |
| | | @RequestMapping("/adjustNew/auth") |
| | | @ManagerAuth(memo = "pda盘点") |
| | | public R adjustNew(@RequestBody MobileAdjustNewParam combParam){ |
| | | mobileService.adjustNew(combParam, getUserId()); |
| | | return R.ok("盘点成功"); |
| | | } |
| | | |
| | | @PostMapping("/order/out/pakout/auth") |
| | | @ManagerAuth(memo = "订单出库") |
| | | public synchronized R pakoutByOrder(@RequestBody JSONObject param) { |
| | |
| | | return mobileService.manDetlOut(json , getUser()); |
| | | } |
| | | |
| | | @RequestMapping("/manDetl/in/barcode") |
| | | @ManagerAuth(memo = "订单上架(托盘码)") |
| | | public R manDetlAddbarcode(@RequestBody JSONObject json){ |
| | | if (json == null){ |
| | | return R.error("传入数据为空"); |
| | | } |
| | | return mobileService.manDetlInBarcode(json,getUser()); |
| | | } |
| | | |
| | | @RequestMapping("/manDetl/in/origin") |
| | | @ManagerAuth(memo = "平库上架") |
| | | public R manDetlIn(@RequestBody JSONObject json){ |
| | | if (json == null){ |
| | | return R.error("传入数据为空"); |
| | | } |
| | | return mobileService.manDetlOrigin(json,getUser()); |
| | | } |
| | | |
| | | @RequestMapping("/manDetl/in/no/origin") |
| | | @ManagerAuth(memo = "平库上架") |
| | | public R manDetlInNo(@RequestBody JSONObject json){ |
| | | if (json == null){ |
| | | return R.error("传入数据为空"); |
| | | } |
| | | return mobileService.manDetlOrigInNo(json,getUser()); |
| | | } |
| | | |
| | | // @RequestMapping("/manDetl/out/origin") |
| | | // @ManagerAuth(memo = "平库下架") |
| | | // public R manDetlout(@RequestBody JSONObject json){ |
| | | // if (json == null){ |
| | | // return R.error("传入数据为空"); |
| | | // } |
| | | // return mobileService.manDetlOriginOut(json,getUser()); |
| | | // } |
| | | |
| | | @RequestMapping("/manDetl/out/origin") |
| | | @ManagerAuth(memo = "平库下架") |
| | | public R manDetlout2(@RequestBody JSONObject json){ |
| | | if (json == null){ |
| | | return R.error("传入数据为空"); |
| | | } |
| | | return mobileService.manDetlOriginOut(json,getUser()); |
| | | } |
| | | |
| | | @RequestMapping("/plaDetl/packin/v1") |
| | | //@ManagerAuth(memo="pla入库") |
| | | public R plaPackIn(@RequestBody JSONObject json){ |
| | | String locNo = json.get("locNo").toString(); |
| | | String batch = json.get("batch").toString(); |
| | | String packageNo = json.get("packageNo").toString(); |
| | | if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ |
| | | return R.error("有参数为空,无法入库"); |
| | | } |
| | | //测试 |
| | | if(true){ |
| | | User user = new User(); |
| | | user.setUsername("test"); |
| | | mobileService.plaPakin(locNo,batch,packageNo,user); |
| | | return R.ok(); |
| | | } |
| | | mobileService.plaPakin(locNo,batch,packageNo,getUser()); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping("/plaDetl/packout1/v1") |
| | | // @ManagerAuth(memo="pla出库") |
| | | public R plaPackOut1(@RequestBody JSONObject json){ |
| | | String locNo = json.get("locNo").toString(); |
| | | String batch = json.get("batch").toString(); |
| | | String packageNo = json.get("packageNo").toString(); |
| | | String orderNo = json.get("orderNo").toString(); |
| | | String orderDetlId = json.get("orderDetlId").toString(); |
| | | String wrkNo = json.get("wrkNo").toString(); |
| | | Double anfme = Double.parseDouble(json.get("anfme").toString()); |
| | | |
| | | if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ |
| | | return R.error("有参数为空,无法入库"); |
| | | } |
| | | |
| | | mobileService.plaPakout(locNo,batch,packageNo,orderNo,orderDetlId,wrkNo,anfme); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping("/plaDetl/packout/v1") |
| | | // @ManagerAuth(memo="pla出库") |
| | | public R plaPackOut(@RequestBody JSONObject json){ |
| | | String locNo = json.get("locNo").toString(); |
| | | String batch = json.get("batch").toString(); |
| | | String packageNo = json.get("packageNo").toString(); |
| | | String orderNo = json.get("orderNo").toString(); |
| | | String orderDetlId = json.get("orderDetlId").toString(); |
| | | String wrkNo = json.get("wrkNo").toString(); |
| | | Double anfme = Double.parseDouble(json.get("anfme").toString()); |
| | | |
| | | if(Cools.isEmpty(locNo) || Cools.isEmpty(batch) || Cools.isEmpty(packageNo)){ |
| | | return R.error("有参数为空,无法入库"); |
| | | } |
| | | |
| | | mobileService.plaPakout(locNo,batch,packageNo,orderNo,orderDetlId,wrkNo,anfme); |
| | | return R.ok(); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String aa = "aabb"; |
| | | String[] ccs = aa.split("cc"); |
| | | System.out.println(ccs[0]); |
| | | } |
| | | |
| | | } |