| | |
| | | import com.consum.base.core.utils.IdUtil; |
| | | import com.consum.base.core.utils.MapUtils; |
| | | import com.consum.base.core.utils.MapperUtil; |
| | | import com.consum.base.pojo.*; |
| | | import com.consum.base.pojo.LWhFormTransferGoodsInfoParam; |
| | | import com.consum.base.pojo.LWhFormTransferParam; |
| | | import com.consum.base.pojo.ProcureModelInfoDto; |
| | | import com.consum.base.pojo.UseRecordDto; |
| | | import com.consum.base.pojo.UseRecordSkuDto; |
| | | import com.consum.base.pojo.query.TransferQry; |
| | | import com.consum.base.pojo.response.FormTransferVO; |
| | | import com.consum.base.pojo.response.FromTransferTemplateInfoVO; |
| | | import com.consum.base.pojo.response.LWHFromTransferExtendVO; |
| | | import com.consum.base.pojo.response.TransferInfoVO; |
| | | import com.consum.base.service.*; |
| | | import com.consum.model.po.*; |
| | | import com.consum.base.service.BaseGoodsModelsServiceImpl; |
| | | import com.consum.base.service.BaseWarehouseServiceImpl; |
| | | import com.consum.base.service.LWhFormTransferCoreService; |
| | | import com.consum.base.service.LWhFormTransferServiceImpl; |
| | | import com.consum.base.service.LWhProcureModelService; |
| | | import com.consum.base.service.LWhProcureModelUserRecordServiceImpl; |
| | | import com.consum.base.service.LWhProcureModelUserServiceImpl; |
| | | import com.consum.model.po.BaseGoodsModels; |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormTransfer; |
| | | import com.consum.model.po.LWhProcureModel; |
| | | import com.consum.model.po.LWhProcureModelUser; |
| | | import com.consum.model.po.LWhProcureModelUserRecord; |
| | | import com.consum.model.vo.LWhFormOutputVo; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @Description 调拨管理 |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/pc/l/wh/form/transfer") |
| | | @Api(tags = "调拨分发管理") |
| | | @Api(value = "调拨分发管理", tags = "调拨分发管理") |
| | | public class LWhFormTransferController extends BaseController { |
| | | |
| | | @Autowired |
| | |
| | | private BaseGoodsModelsServiceImpl baseGoodsModelsService; |
| | | @Autowired |
| | | private BaseWarehouseServiceImpl baseWarehouseService; |
| | | |
| | | /** |
| | | * @Description 新增 |
| | | */ |
| | |
| | | if (currentUser == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | | } |
| | | |
| | | /*当前登录人只能看到自己机构下的列表*/ |
| | | GenericPager genericPager = lWhFormTransferService.queryFormTransferList(param); |
| | | List<LWhFormTransfer> datas = genericPager.getDatas(); |
| | | ArrayList<FormTransferVO> result = new ArrayList<>(); |
| | |
| | | return ResponseValue.success(vo); |
| | | } |
| | | |
| | | @ApiOperation(value = "调拨明细列表", notes = "调拨明细列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "param", value = "条件", required = true, dataType = "TransferQry"), |
| | | }) |
| | | @GetMapping("/detail/list") |
| | | public ResponseValue queryFormTransferDetailList(TransferQry param) { |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | | } |
| | | GenericPager<Map<String, Object>> mapGenericPager = lWhFormTransferService.queryFormTransferDetailList(param); |
| | | |
| | | return ResponseValue.success(mapGenericPager); |
| | | } |
| | | |
| | | /** |
| | | * 撤销 |
| | | * |
| | |
| | | FinSysTenantUser sysTenantUser = this.getSysInfo(); |
| | | String agencyId = sysTenantUser.getTenantId(); |
| | | List<BaseWarehouse> baseWarehouseList = baseWarehouseService.getByAgencyId(Long.valueOf(agencyId), (short) 1, (short) 1); |
| | | if (CollectionUtils.isEmpty(baseWarehouseList)){ |
| | | if (CollectionUtils.isEmpty(baseWarehouseList)) { |
| | | return ResponseValue.error("机构无默认仓库!"); |
| | | } |
| | | BaseWarehouse baseWarehouse = baseWarehouseList.get(0); |
| | |
| | | public ResponseValue queryDepartmentTransferOrder(Long agencyId) { |
| | | |
| | | TransferInfoVO transferInfoVO = new TransferInfoVO(); |
| | | String sql = "SELECT ft.id,\n" |
| | | + " ft.BUSINESS_FORM_CODE,\n" |
| | | + " gr.GOODS_TEMPLATE_NAME,\n" |
| | | + " gr.BASE_GOODS_TEMPLATE_ID,\n" |
| | | + " ft.CREATE_TIME\n" |
| | | + "\n" |
| | | + "FROM l_wh_form_transfer ft\n" |
| | | + " LEFT JOIN L_WAREHOUSE_FLOW wf ON ft.id = wf.BUSINESS_FORM_ID\n" |
| | | + " left join L_WH_GOODS_RECORD gr on gr.WAREHOUSE_FLOW_ID = wf.id\n" |
| | | + " LEFT JOIN L_GOODS_WH_RECORD gwr on gwr.WAREHOUSE_FLOW_ID = wf.id\n" |
| | | + " left join L_WH_GOODS g on g.id = gwr.WH_GOODS_ID\n" |
| | | + "\n" |
| | | + "\n" |
| | | + "\n" |
| | | + "\n"; |
| | | return ResponseValue.success(transferInfoVO); |
| | | } |
| | | } |