This commit is contained in:
zds
2022-12-08 20:24:08 +08:00
parent 7eaaf831a9
commit 9c6613614b

View File

@@ -633,53 +633,21 @@ public class CheckServiceImpl implements CheckService {
JSONObject jo = rows.getJSONObject(i);
Map<String, Object> map = new LinkedHashMap<>();
map.put("盘点单号", jo.getString("check_code"));
map.put("明细序号", jo.getString("seq_no"));
map.put("库区编码", jo.getString("sect_code"));
map.put("序号", jo.getString("seq_no"));
map.put("库区名称", jo.getString("sect_name"));
map.put("货位编码", jo.getString("struct_code"));
map.put("货位名称", jo.getString("struct_name"));
map.put("载具号", jo.getString("storagevehicle_code"));
map.put("物料编码", jo.getString("material_code"));
map.put("物料名称", jo.getString("material_name"));
map.put("桶数", jo.getIntValue("base_qty"));
map.put("盘点桶数", jo.getIntValue("fac_qty"));
map.put("单位", jo.getString("qty_unit_name"));
String check_result = jo.getString("check_result");
if (check_result.equals("0")) {
map.put("盘点结果", "正常");
} else if (check_result.equals("1")) {
map.put("盘点结果", "盘亏");
} else if (check_result.equals("2")) {
map.put("盘点结果", "盘盈");
}
String status = jo.getString("status");
if (status.equals("01")) {
map.put("状态", "生成");
} else if (status.equals("04")) {
map.put("状态", "盘点中");
} else if (status.equals("05")) {
map.put("状态", "已盘点");
} else if (status.equals("06")) {
map.put("状态", "异常处理中");
} else if (status.equals("07")) {
map.put("状态", "异常处理完成");
} else if (status.equals("99")) {
map.put("状态", "确认完成");
}
map.put("异常处理人", jo.getString("process_optname"));
map.put("异常处理时间", jo.getString("process_time"));
String process_type = jo.getString("process_type");
if (process_type.equals("0")) {
map.put("异常处理方式", "账务为准");
} else if (process_type.equals("1")) {
map.put("异常处理方式", "实物为准");
}
map.put("桶号", jo.getString("bucketunique"));
if (StrUtil.isNotEmpty(jo.getString("storage_qty"))) {
map.put("桶重量", NumberUtil.round(jo.getString("storage_qty"),3).toString());
}else{
map.put("桶重量", "");
}
map.put("桶数", jo.getIntValue("base_qty"));
map.put("实盘桶数", jo.getIntValue("fac_qty"));
map.put("实盘重量", "");
list.add(map);
}
FileUtil.downloadExcel(list, response);