|  |  |  | 
|---|
|  |  |  | package com.ld.igds.inout.manager; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.ld.igds.constant.Constant; | 
|---|
|  |  |  | import com.ld.igds.inout.InoutConstant; | 
|---|
|  |  |  | import com.ld.igds.inout.dto.InoutData; | 
|---|
|  |  |  | import com.ld.igds.inout.service.InoutService; | 
|---|
|  |  |  | import com.ld.igds.io.dto.WeightDto; | 
|---|
|  |  |  | import com.ld.igds.m.service.InoutCommonService; | 
|---|
|  |  |  | import com.ld.igds.models.DicTrigger; | 
|---|
|  |  |  | import com.ld.igds.models.InoutConf; | 
|---|
|  |  |  | import com.ld.igds.models.InoutSysConf; | 
|---|
|  |  |  | import com.ld.igds.sys.service.DicTriggerService; | 
|---|
|  |  |  | import com.ld.igds.util.ContextUtil; | 
|---|
|  |  |  | import org.apache.commons.lang3.StringUtils; | 
|---|
|  |  |  | import org.springframework.stereotype.Component; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | private DicTriggerService dicTriggerService; | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private InoutService inoutService; | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private InoutEventControlManager inoutEventControl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取出入库的整个流程信息 | 
|---|
|  |  |  | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public InoutConf getInoutConf(List<InoutConf> listInoutConf, String sort,String type) { | 
|---|
|  |  |  | public InoutConf getInoutConf(List<InoutConf> listInoutConf, String sort, String type) { | 
|---|
|  |  |  | if (null == listInoutConf) return new InoutConf(sort); | 
|---|
|  |  |  | if (StringUtils.isEmpty(sort)) sort = "1"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | InoutConf result = null; | 
|---|
|  |  |  | for (InoutConf conf : listInoutConf) { | 
|---|
|  |  |  | if (sort.equals(conf.getSort()) && type.equals(conf.getType())) { | 
|---|
|  |  |  | return conf; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (null == result) return new InoutConf(sort); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | return new InoutConf(sort); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | public String getWeightEditTag(String companyId, String deptId) { | 
|---|
|  |  |  | // 从缓存中获取出入库系统配置信息 | 
|---|
|  |  |  | InoutSysConf inoutSysConf = inoutCommonService.getCacheInoutSysConf(companyId, deptId); | 
|---|
|  |  |  | String weightEditTag = null; | 
|---|
|  |  |  | String weightEditTag = Constant.YN_N; | 
|---|
|  |  |  | if (inoutSysConf != null) { | 
|---|
|  |  |  | weightEditTag = inoutSysConf.getWeightEditTag(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (null == weightEditTag) weightEditTag = Constant.YN_N; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return weightEditTag; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param deptId | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public void initInoutScreen(String deptId) { | 
|---|
|  |  |  | if (StringUtils.isEmpty(deptId)) | 
|---|
|  |  |  | deptId = ContextUtil.subDeptId(null); | 
|---|
|  |  |  | inoutService.initInoutScreen(deptId); | 
|---|
|  |  |  | public void initInoutScreen(String companyId, String deptId) { | 
|---|
|  |  |  | if (StringUtils.isEmpty(companyId)) return; | 
|---|
|  |  |  | if (StringUtils.isEmpty(deptId)) return; | 
|---|
|  |  |  | inoutEventControl.initInoutScreen(companyId, deptId, null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public List<InoutData> getListInoutCache(String deptId) { | 
|---|
|  |  |  | return inoutService.getListInoutCache(deptId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public List<InoutData> getCompleteListInoutCache(String deptId) { | 
|---|