rev:出库
This commit is contained in:
@@ -98,7 +98,7 @@ public class HeartClientServer extends AbstraceServer {
|
||||
executor.submit(()->{
|
||||
while (channel!=null && channel.isActive()){
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
Thread.sleep(1500);
|
||||
ByteBuf log = Unpooled.copiedBuffer("ping--222-", CharsetUtil.UTF_8);
|
||||
if (channel==null){
|
||||
return;
|
||||
|
||||
@@ -15,6 +15,6 @@ import java.nio.charset.StandardCharsets;
|
||||
*/
|
||||
public class RunClientHeartMain {
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
HeartClientServer heartServer = new HeartClientServer(new InetSocketAddress("192.168.10.60", 20889));
|
||||
// HeartClientServer heartServer = new HeartClientServer(new InetSocketAddress("192.168.10.60", 20889));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class BmFormStrucController {
|
||||
//参数判读,参数解析,调用参数入库
|
||||
QueryWrapper<BmFormStruc> queryWrapper = new QueryWrapper<BmFormStruc>().select("form_type", "form_name").isNull("parent_id").groupBy("form_type");
|
||||
if (StringUtils.isNotEmpty(desc)){
|
||||
queryWrapper.eq("form_desc",desc);
|
||||
queryWrapper.like("form_desc",desc);
|
||||
}
|
||||
List<Map<String, Object>> select = iBmFormStrucService.listMaps(queryWrapper);
|
||||
List<Map> list = new ArrayList<>();
|
||||
|
||||
@@ -80,10 +80,10 @@ public class PdaOutController {
|
||||
@Log("查询单据数据")
|
||||
@SaIgnore
|
||||
public ResponseEntity<TableDataInfo<PmFormDataDto>> orderConfirm(@RequestBody JSONObject param) {
|
||||
if (param==null || StringUtils.isEmpty(param.getString("code"))){
|
||||
if (param==null || StringUtils.isEmpty(param.getString("code"))||StringUtils.isEmpty(param.getString("stor_code"))){
|
||||
throw new BadRequestException("请求参数不能为空");
|
||||
}
|
||||
PmFormDataDto pmFormDataDto = iPmFormDataService.queryErpCode(param.getString("code"));
|
||||
PmFormDataDto pmFormDataDto = iPmFormDataService.queryErpCode(param.getString("code"),param.getString("stor_code"));
|
||||
return new ResponseEntity<>(TableDataInfo.build(ListOf.of(pmFormDataDto)), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ public class PdaIOService {
|
||||
HashMap map = MapOf.of("end_struct_code", "", "start_struct_code", "", "order", "", "product_area", productArea);
|
||||
ivtDtl.setForm_data(new JSONObject(map));
|
||||
ivtDtl.setQty(now_assign_qty);
|
||||
ivtDtl.setPcsn(pdaFormOutMst.getPcsn());
|
||||
ivtDtl.setPcsn(dtl.getPcsn());
|
||||
ivtDtl.setStor_code(storCode);//pdaFormOutMst.getStor_code()
|
||||
ivtDtl.setId(IdUtil.getStringId());
|
||||
ivtDtl.setInv_id(mst.getId());
|
||||
|
||||
@@ -42,7 +42,7 @@ public interface IPmFormDataService extends IService<PmFormData> {
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
PmFormDataDto queryErpCode(String code);
|
||||
PmFormDataDto queryErpCode(String code,String stor_code);
|
||||
|
||||
/**
|
||||
* 一对多同步改成一对一同步
|
||||
|
||||
@@ -191,10 +191,12 @@ public class PmFormDataServiceImpl extends ServiceImpl<PmFormDataMapper, PmFormD
|
||||
if (!CollectionUtils.isEmpty(childs)){
|
||||
Map<String, List<PmFormDataDto>> childMap = childs.stream().collect(Collectors.groupingBy(PmFormDataDto::getParent_id));
|
||||
for (PmFormDataDto dataDto : pmFormDataDtos) {
|
||||
String productArea = dataDto.getForm_data().getString("product_area");
|
||||
dataDto.setProduct_area(productArea);
|
||||
List<PmFormDataDto> children = childMap.get(dataDto.getId());
|
||||
for (PmFormDataDto child : children) {
|
||||
String productArea = child.getForm_data().getString("product_area");
|
||||
child.setProduct_area(productArea);
|
||||
String childProductArea = child.getForm_data().getString("product_area");
|
||||
child.setProduct_area(childProductArea);
|
||||
}
|
||||
dataDto.setChildren(children);
|
||||
}
|
||||
@@ -206,7 +208,7 @@ public class PmFormDataServiceImpl extends ServiceImpl<PmFormDataMapper, PmFormD
|
||||
}
|
||||
|
||||
@Override
|
||||
public PmFormDataDto queryErpCode(String code) {
|
||||
public PmFormDataDto queryErpCode(String code,String stor_code) {
|
||||
FormDataQuery query = new FormDataQuery();
|
||||
query.setCode(code);
|
||||
query.setStatus(new String[]{StatusEnum.FORM_STATUS.code("生成"),StatusEnum.FORM_STATUS.code("执行中")});
|
||||
@@ -219,14 +221,16 @@ public class PmFormDataServiceImpl extends ServiceImpl<PmFormDataMapper, PmFormD
|
||||
if (CollectionUtils.isEmpty(childs)){
|
||||
throw new BadRequestException(code+"单据明细数据为空");
|
||||
}
|
||||
String productArea = pmFormDataDto.getForm_data().getString("product_area");
|
||||
pmFormDataDto.setProduct_area(productArea);
|
||||
|
||||
List<String> collect = childs.stream().map(PmFormDataDto::getMaterial_id).collect(Collectors.toList());
|
||||
//TODO:指定仓库
|
||||
List<StructAssignQty> structMaterials = iStIvtStructattrService.getStructIvtAssign(collect, "FStockId");
|
||||
List<StructAssignQty> structMaterials = iStIvtStructattrService.getStructIvtAssign(collect, stor_code);
|
||||
Map<String, List<StructAssignQty>> materialMap = structMaterials.stream().collect(Collectors.groupingBy(StructAssignQty::getMaterial_id));
|
||||
|
||||
for (PmFormDataDto child : childs) {
|
||||
String productArea = child.getForm_data().getString("product_area");
|
||||
child.setProduct_area(productArea);
|
||||
String childProductArea = child.getForm_data().getString("product_area");
|
||||
child.setProduct_area(childProductArea);
|
||||
List<StructAssignQty> maps = materialMap.get(child.getMaterial_id());
|
||||
if (CollectionUtils.isEmpty(maps)){
|
||||
child.setSto_qty(new BigDecimal(0));
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
class="demod-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
|
||||
Reference in New Issue
Block a user