| | |
| | | import com.ld.igds.io.request.DepotStatusRequest; |
| | | import com.ld.igds.io.response.BaseResponse; |
| | | import com.ld.igds.models.*; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.bstek.bdf2.core.business.IUser; |
| | | import com.bstek.dorado.annotation.DataProvider; |
| | | import com.bstek.dorado.annotation.DataResolver; |
| | |
| | | import com.ld.igds.common.CoreSerService; |
| | | import com.ld.igds.constant.BizType; |
| | | import com.ld.igds.constant.Constant; |
| | | import com.ld.igds.constant.DepotStatus; |
| | | import com.ld.igds.constant.DepotType; |
| | | import com.ld.igds.constant.FoodLevel; |
| | | import com.ld.igds.order.ExeOrderService; |
| | | import com.ld.igds.order.data.ExeRequest; |
| | | import com.ld.igds.util.ContextUtil; |
| | |
| | | private RemoteManager remoteManager; |
| | | @Autowired |
| | | private ExeOrderService exeOrderService; |
| | | |
| | | |
| | | /** |
| | | * 仓房类型-非国标定义 |
| | | * ${dorado.getDataProvider("depotPR#triggerDepotType").getResult()} |
| | | * |
| | | * @return |
| | | */ |
| | | @DataProvider |
| | | public List<DicTrigger> triggerDepotType() { |
| | | List<DicTrigger> list = new ArrayList<DicTrigger>(); |
| | | list.add(new DicTrigger(DepotType.TYPE_01.getCode(), DepotType.TYPE_01.getMsg())); |
| | | list.add(new DicTrigger(DepotType.TYPE_02.getCode(), DepotType.TYPE_02.getMsg())); |
| | | list.add(new DicTrigger(DepotType.TYPE_03.getCode(), DepotType.TYPE_03.getMsg())); |
| | | list.add(new DicTrigger(DepotType.TYPE_04.getCode(), DepotType.TYPE_04.getMsg())); |
| | | list.add(new DicTrigger(DepotType.TYPE_99.getCode(), DepotType.TYPE_99.getMsg())); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 仓房状态 |
| | | * ${dorado.getDataProvider("depotPR#triggerDepotStatus").getResult()} |
| | | * |
| | | * @return |
| | | */ |
| | | @DataProvider |
| | | public List<DicTrigger> triggerDepotStatus() { |
| | | List<DicTrigger> list = new ArrayList<DicTrigger>(); |
| | | list.add(new DicTrigger(DepotStatus.STATUS_1.getCode(), DepotStatus.STATUS_1.getMsg())); |
| | | list.add(new DicTrigger(DepotStatus.STATUS_2.getCode(), DepotStatus.STATUS_2.getMsg())); |
| | | list.add(new DicTrigger(DepotStatus.STATUS_3.getCode(), DepotStatus.STATUS_3.getMsg())); |
| | | list.add(new DicTrigger(DepotStatus.STATUS_4.getCode(), DepotStatus.STATUS_4.getMsg())); |
| | | list.add(new DicTrigger(DepotStatus.STATUS_31.getCode(), DepotStatus.STATUS_31.getMsg())); |
| | | list.add(new DicTrigger(DepotStatus.STATUS_32.getCode(), DepotStatus.STATUS_32.getMsg())); |
| | | list.add(new DicTrigger(DepotStatus.STATUS_33.getCode(), DepotStatus.STATUS_33.getMsg())); |
| | | list.add(new DicTrigger(DepotStatus.STATUS_34.getCode(), DepotStatus.STATUS_34.getMsg())); |
| | | list.add(new DicTrigger(DepotStatus.STATUS_9.getCode(), DepotStatus.STATUS_9.getMsg())); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 粮食等级 |
| | | * ${dorado.getDataProvider("depotPR#triggerFoodLevel").getResult()} |
| | | * |
| | | * @return |
| | | */ |
| | | @DataProvider |
| | | public List<DicTrigger> triggerFoodLevel() { |
| | | List<DicTrigger> list = new ArrayList<DicTrigger>(); |
| | | list.add(new DicTrigger(FoodLevel.LEVEL_01.getCode(), FoodLevel.LEVEL_01.getMsg())); |
| | | list.add(new DicTrigger(FoodLevel.LEVEL_02.getCode(), FoodLevel.LEVEL_02.getMsg())); |
| | | list.add(new DicTrigger(FoodLevel.LEVEL_03.getCode(), FoodLevel.LEVEL_03.getMsg())); |
| | | list.add(new DicTrigger(FoodLevel.LEVEL_04.getCode(), FoodLevel.LEVEL_04.getMsg())); |
| | | list.add(new DicTrigger(FoodLevel.LEVEL_05.getCode(), FoodLevel.LEVEL_05.getMsg())); |
| | | list.add(new DicTrigger(FoodLevel.LEVEL_06.getCode(), FoodLevel.LEVEL_06.getMsg())); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 储粮方式 |
| | |
| | | List<DicTrigger> list = new ArrayList<DicTrigger>(); |
| | | list.add(new DicTrigger("1", "散装储粮")); |
| | | list.add(new DicTrigger("2", "包装储粮")); |
| | | list.add(new DicTrigger("3", "围包散存")); |
| | | list.add(new DicTrigger("3", "围包存")); |
| | | list.add(new DicTrigger("9", "其他")); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 管理方式 |
| | | * ${dorado.getDataProvider("depotPR#triggerManagerType").getResult()} |
| | | * |
| | | * @return |
| | | */ |
| | | @DataProvider |
| | | public List<DicTrigger> triggerManagerType() { |
| | | List<DicTrigger> list = new ArrayList<DicTrigger>(); |
| | | list.add(new DicTrigger("01", "直储")); |
| | | list.add(new DicTrigger("02", "代储")); |
| | | list.add(new DicTrigger("03", "租仓")); |
| | | list.add(new DicTrigger("04", "委托")); |
| | | return list; |
| | | } |
| | | |
| | |
| | | depotService.saveDepot(depot); |
| | | } else { |
| | | depotService.updataDepot(depot); |
| | | |
| | | if (StringUtils.isNotEmpty(depot.getEditTag())) { |
| | | // 表示修改了仓库状态 |
| | | if (depot.getEditTag().indexOf("depotStatus") >= 0) { |
| | | this.pullDepotStatus(depot.getCompanyId(), depot.getId(), depot.getDepotStatus()); |
| | | } |
| | | } |
| | | // TODO |
| | | // if (StringUtils.isNotEmpty(depot.getEditTag())) { |
| | | // // 表示修改了仓库状态 |
| | | // if (depot.getEditTag().indexOf("depotStatus") >= 0) { |
| | | // this.pullDepotStatus(depot.getCompanyId(), depot.getId(), depot.getDepotStatus()); |
| | | // } |
| | | // } |
| | | } |
| | | //恢复标签 |
| | | depot.setEditTag(null); |
| | | |
| | | flushCache(); |
| | | |