Commit 4eec9180 authored by chenzhao's avatar chenzhao

修复发货详情bug

parent f462b681
......@@ -10,6 +10,7 @@ import lombok.Value;
import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
*
......@@ -20,7 +21,7 @@ import java.util.List;
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("hygf_replenishment")
@TableName(value="hygf_replenishment",autoResultMap = true)
public class HygfReplenishment extends BaseEntity {
private static final long serialVersionUID = 1L;
......@@ -41,6 +42,6 @@ public class HygfReplenishment extends BaseEntity {
* 补货文件
*/
@TableField(value = "file" , typeHandler = FastjsonTypeHandler.class)
private List<Object> file;
private List<Map> file;
}
......@@ -151,7 +151,8 @@ public class PreparationMoney extends BaseEntity {
private List<PreparationMoneyLog> preparationMoneyLog; //发货单流水
@TableField(exist = false)
private List<HygfReplenishmentDto> files; //发货单流水
private List<HygfReplenishment> files;
@TableField(exist = false)
private String instanceId; //发货单流水
......
......@@ -190,19 +190,13 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
List<DocumentStation> li = documentStationMapper.selectList(q);
preparationMoney.setPeasantHouseholdId(li);
List<HygfReplenishment> hygfReplenishments = new ArrayList<>();
List<HygfReplenishmentDto> hygfReplenishmentDtos = hygfReplenishmentMapper.selectData(sequenceNbr);
if (CollectionUtil.isNotEmpty(hygfReplenishmentDtos) && !hygfReplenishmentDtos.isEmpty() ){
LambdaQueryWrapper<HygfReplenishment> files = new LambdaQueryWrapper<>();
files.eq(HygfReplenishment::getPreparationMoneyId,sequenceNbr);
List<HygfReplenishment> hygfReplenishments1 = hygfReplenishmentMapper.selectList(files);
hygfReplenishmentDtos.forEach(e->{
HygfReplenishment hygfReplenishment = new HygfReplenishment();
BeanUtils.copyProperties(e,hygfReplenishment);
hygfReplenishment.setFile(JSON.parseArray(e.getFile()));
hygfReplenishments.add(hygfReplenishment);
});
preparationMoney.setFiles(hygfReplenishmentDtos);
if (CollectionUtil.isNotEmpty(hygfReplenishments1) && !hygfReplenishments1.isEmpty() ){
preparationMoney.setFiles(hygfReplenishments1);
}
return preparationMoney;
......@@ -321,22 +315,14 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
Map<String, Object> map2 = Bean.BeantoMap(preparationMoney);
List<HygfReplenishment> hygfReplenishments = new ArrayList<>();
List<HygfReplenishmentDto> hygfReplenishmentDtos = hygfReplenishmentMapper.selectData(Long.valueOf(sequenceNbr));
if (CollectionUtil.isNotEmpty(hygfReplenishmentDtos) && !hygfReplenishmentDtos.isEmpty() ) {
LambdaQueryWrapper<HygfReplenishment> files = new LambdaQueryWrapper<>();
files.eq(HygfReplenishment::getPreparationMoneyId,sequenceNbr);
List<HygfReplenishment> hygfReplenishments = hygfReplenishmentMapper.selectList(files);
hygfReplenishmentDtos.forEach(e -> {
HygfReplenishment hygfReplenishment = new HygfReplenishment();
BeanUtils.copyProperties(e, hygfReplenishment);
hygfReplenishment.setFile(JSON.parseArray(e.getFile()));
hygfReplenishments.add(hygfReplenishment);
});
if (CollectionUtil.isNotEmpty(hygfReplenishments) && !hygfReplenishments.isEmpty() ){
map2.put("files",hygfReplenishments);
}
map.put("preparationMoney", map2);
map.put("designInformation", designInformation);
Map<String, Object> map1 = new HashMap<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment