This commit is contained in:
2022-11-29 15:22:23 +08:00
19 changed files with 157 additions and 227 deletions

View File

@@ -34,14 +34,14 @@ public class UserStorController {
@Log("查询所有仓库")
@ApiOperation("查询所有仓库")
public ResponseEntity<Object> queryStor(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(userStorService.queryStor(whereJson),HttpStatus.NO_CONTENT);
return new ResponseEntity<>(userStorService.queryStor(whereJson),HttpStatus.OK);
}
@PostMapping("/queryUserStor")
@Log("查询用户对应仓库")
@ApiOperation("查询用户对应仓库")
public ResponseEntity<Object> queryUserStor(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(userStorService.queryUserStor(whereJson),HttpStatus.NO_CONTENT);
return new ResponseEntity<>(userStorService.queryUserStor(whereJson),HttpStatus.OK);
}
@PostMapping("/save")
@@ -49,7 +49,7 @@ public class UserStorController {
@ApiOperation("保存用户仓库信息")
public ResponseEntity<Object> save(@RequestBody JSONObject whereJson) {
userStorService.save(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
return new ResponseEntity<>(HttpStatus.OK);
}
}

View File

@@ -32,6 +32,6 @@ public interface UserStorService {
* 保存
* @param whereJson /
*/
JSONArray save(JSONObject whereJson);
void save(JSONObject whereJson);
}

View File

@@ -42,11 +42,11 @@ public class StructivtServiceImpl implements StructivtService {
public Map<String,Object> queryAll(Map whereJson, Pageable page){
String material = MapUtil.getStr(whereJson, "material");
String struct = MapUtil.getStr(whereJson, "struct");
String region_id = MapUtil.getStr(whereJson, "region_id");
String stor_id = MapUtil.getStr(whereJson, "stor_id");
String pcsn = MapUtil.getStr(whereJson, "pcsn");
JSONObject map = new JSONObject();
map.put("flag", "1");
map.put("region_id", region_id);
map.put("stor_id", stor_id);
if (StrUtil.isNotEmpty(material)) {
map.put("material", "%" + material + "%");
}

View File

@@ -54,11 +54,26 @@ public class UserStorServiceImpl implements UserStorService {
@Override
public JSONArray queryUserStor(JSONObject whereJson) {
return null;
String user_id = whereJson.getString("user_id");
JSONArray rows = WQLObject.getWQLObject("st_ivt_userstor").query("user_id = '" + user_id + "'").getResultJSONArray(0);
return rows;
}
@Override
public JSONArray save(JSONObject whereJson) {
return null;
public void save(JSONObject whereJson) {
JSONObject jo = whereJson.getJSONObject("jo");
JSONArray rows = whereJson.getJSONArray("rows");
String user_id = jo.getString("user_id");
WQLObject.getWQLObject("st_ivt_userstor").delete("user_id ='" + user_id + "'");
for (int i = 0; i < rows.size(); i++) {
JSONObject row = rows.getJSONObject(i);
String stor_id = row.getString("stor_id");
JSONObject user_stor = new JSONObject();
user_stor.put("stor_id", stor_id);
user_stor.put("user_id", user_id);
WQLObject.getWQLObject("st_ivt_userstor").insert(user_stor);
}
}
}

View File

@@ -104,17 +104,20 @@
IF 输入.flag = "3"
PAGEQUERY
SELECT
*
sys_user.*,
dept.name
FROM
sys_user
sys_user sys_user
LEFT JOIN sys_dept dept ON dept.dept_id = sys_user.dept_id
WHERE
enabled = '1'
sys_user.enabled = '1'
OPTION 输入.blurry <> ""
(
username like 输入.blurry
OR
nick_name like 输入.blurry
)
ENDOPTION
ENDSELECT
ENDPAGEQUERY
ENDIF

View File

@@ -16,7 +16,7 @@
输入.flag TYPEAS s_string
输入.struct TYPEAS s_string
输入.material TYPEAS s_string
输入.region_id TYPEAS f_string
输入.stor_id TYPEAS s_string
输入.pcsn TYPEAS s_string
[临时表]
@@ -82,8 +82,8 @@
ivt.pcsn like 输入.pcsn
ENDOPTION
OPTION 输入.region_id <> ""
ivt.region_id = 输入.region_id
OPTION 输入.stor_id <> ""
attr.stor_id = 输入.stor_id
ENDOPTION
ENDSELECT
ENDPAGEQUERY

View File

@@ -100,6 +100,7 @@ public class SapToLmsServiceImpl implements SapToLmsService {
jsonMst.put("receiptphone", json.getString("TEL_NUMBER")); // 联系电话
jsonMst.put("contractno", json.getString("BSTNK")); // 合同号
jsonMst.put("cust_code", json.getString("KUNNR")); // 客户
jsonMst.put("remark",json.getString("LGORT"));//库位
// 明细
JSONObject jsonMater = materTab.query("material_code = '" + json.getString("MATNR") + "'").uniqueResult(0);
@@ -117,6 +118,7 @@ public class SapToLmsServiceImpl implements SapToLmsService {
tableData.add(jsonDtl);
}
if (StrUtil.equals(lfart, "ZLR")) {
jsonMst.put("remark",json.getString("LGORT"));//库位
HashMap map = new HashMap();
//更新包装关系
String sap_pcsn = json.getString("CHARG");
@@ -185,7 +187,6 @@ public class SapToLmsServiceImpl implements SapToLmsService {
map.put("net_weight", sub_jo.getString("net_weight"));
map.put("package_box_sn", sub_jo.getString("package_box_sn"));
map.put("product_name", sub_jo.getString("product_name"));
map.put("product_name", sub_jo.getString("product_name"));
map.put("vbeln", json.getString("VBELN"));
map.put("posnr", json.getString("POSNR"));
box_rows.add(map);

View File

@@ -29,7 +29,7 @@ public class SubpackagerelationDto implements Serializable {
private BigDecimal box_weight;
/** 保质期 */
private BigDecimal quality_guaran_period;
private String quality_guaran_period;
/** 销售订单及行号 */
private String sale_order_name;

View File

@@ -57,7 +57,7 @@ public class InAndOutReturnlController {
@PostMapping("/disupload")
@Log("不回传")
@ApiOperation("不回传")
public ResponseEntity<Object> disupload(@RequestBody Map whereJson) {
public ResponseEntity<Object> disupload(@RequestBody JSONObject whereJson) {
inAndOutReturnService.disupload(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}

View File

@@ -22,6 +22,6 @@ public interface InAndOutReturnService {
void uploadSAP(JSONObject whereJson);
void disupload(Map whereJson);
void disupload(JSONObject whereJson);
}

View File

@@ -131,7 +131,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
jsonDtl.put("LGORT", json.getString("remark")); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
@@ -260,7 +261,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
jsonDtl.put("LGORT", json.getString("remark")); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
@@ -318,7 +320,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
JSONObject jsonSect = sectTab.query("sect_id = '" + json.getString("sect_id") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 库存地点:库区外部标识
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 库存地点:库区外部标识
jsonDtl.put("LGORT", json.getString("remark")); // 库存地点:库区外部标识
}
JSONObject jsonSub = subTab.query("container_name = '" + json.getString("pcsn") + "'").uniqueResult(0);
@@ -348,7 +351,29 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
@Transactional(rollbackFor = Exception.class)
@Override
public void disupload(Map whereJson) {
public void disupload(JSONObject whereJson) {
//出库分配表
WQLObject wo_dis = WQLObject.getWQLObject("ST_IVT_IOStorInvDis");
//出库明细表
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl");
//出库主表
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_IOStorInv");
// 物料表
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase");
// 库区表
WQLObject sectTab = WQLObject.getWQLObject("st_ivt_sectattr");
// 子卷包装关系表
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
JSONArray rows = whereJson.getJSONArray("rows");
for (int i = 0; i < rows.size(); i++) {
JSONObject jo_mst = rows.getJSONObject(i);
jo_mst.put("is_upload", "1");
jo_mst.put("upload_optid", SecurityUtils.getCurrentUserId());
jo_mst.put("upload_time", DateUtil.now());
WQLObject.getWQLObject("ST_IVT_IOStorInv").update(jo_mst);
}
}
@Override
@@ -422,7 +447,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
// jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
jsonDtl.put("LGORT", json.getString("remark")); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
@@ -511,7 +537,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSect)) {
jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
jsonDtl.put("LGORT", json.getString("remark")); // 明細储存地点
}
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
@@ -589,7 +616,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
jsonDtl.put("BWART", "311");
jsonDtl.put("MENGE", json.getDoubleValue("plan_qty"));
jsonDtl.put("MEINS", json.getString("qty_unit_id"));
jsonDtl.put("LGORT", ""); // 库存地点
jsonDtl.put("LGORT", json.getString("remark")); // 库存地点
jsonDtl.put("CHARG", json.getString("pcsn"));
jsonDtl.put("UMLGO", ""); // 收货库存地点
jsonDtl.put("UMCHA", json.getString("pcsn"));