| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.annotations.AppAuth; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | |
| | | @RequestMapping("mobile") |
| | | @Slf4j |
| | | public class MobileController extends BaseController { |
| | | |
| | | private static final boolean auth = true; |
| | | public static final ArrayList<String> APP_KEY_LIST = new ArrayList<String>() {{ |
| | | add("ea1f0459efc02a79f046f982767939ae"); |
| | | }}; |
| | | |
| | | @Autowired |
| | | private MobileService mobileService; |
| | |
| | | public R pdaAgvFinishedCall(@RequestBody Map<String,Object> map){ |
| | | return mobileService.FinishedCall(map); |
| | | } |
| | | @PostMapping("/agv/2fPack") |
| | | @PostMapping("/agv/agv2fPack") |
| | | @ManagerAuth |
| | | public R pdaAgv2fPack(@RequestBody Map<String,Object> map){ |
| | | return mobileService.agv2fPack(map); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping("/pingKu/getList/auth") |
| | | @ManagerAuth(memo = "平库获取库存列表") |
| | | @AppAuth(memo = "平库获取库存列表") |
| | | public R pingKuGetList(@RequestBody PKInventoryAdjustment combParam){ |
| | | auth("", combParam, request); |
| | | if (Cools.isEmpty(combParam.getLocno())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | List<ManLocDetl> manLocDetls = mobileService.pingKuGetList(combParam); |
| | | |
| | | return R.ok(manLocDetls); |
| | | } |
| | | |
| | | @RequestMapping("/pingKu/inventoryAdjustment/auth") |
| | | @ManagerAuth(memo = "库存调整") |
| | | @AppAuth(memo = "库存调整") |
| | | public R pingKuInventoryAdjustment(@RequestBody PKInventoryAdjustment combParam, HttpServletRequest request){ |
| | | auth("", combParam, request); |
| | | if (Cools.isEmpty(combParam.getLocno())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | mobileService.pingKuInventoryAdjustment(combParam); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | private void auth(String appkey, Object obj, HttpServletRequest request) { |
| | | // log.info("{}接口被访问;appkey:{};请求数据:{}", request.getRequestURI(), appkey, JSON.toJSONString(obj)); |
| | | request.setAttribute("cache", obj); |
| | | } |
| | | |
| | | @RequestMapping("/pack/get/auth") |
| | | @ManagerAuth |
| | | public R packGet(@RequestParam String barcode){ |