|
@@ -10,9 +10,7 @@ import com.dk.common.model.vo.mst.StaffVO;
|
|
|
import com.dk.common.response.ResponseCodeEnum;
|
|
import com.dk.common.response.ResponseCodeEnum;
|
|
|
import com.dk.common.response.ResponseResultUtil;
|
|
import com.dk.common.response.ResponseResultUtil;
|
|
|
import com.dk.common.response.ResponseResultVO;
|
|
import com.dk.common.response.ResponseResultVO;
|
|
|
-import com.dk.oauth.entity.Company;
|
|
|
|
|
-import com.dk.oauth.entity.MenuFrequency;
|
|
|
|
|
-import com.dk.oauth.entity.UserLogin;
|
|
|
|
|
|
|
+import com.dk.oauth.entity.*;
|
|
|
import com.dk.oauth.feign.service.OrgFeign;
|
|
import com.dk.oauth.feign.service.OrgFeign;
|
|
|
import com.dk.oauth.feign.service.StaffFeign;
|
|
import com.dk.oauth.feign.service.StaffFeign;
|
|
|
import com.dk.oauth.mapper.*;
|
|
import com.dk.oauth.mapper.*;
|
|
@@ -59,6 +57,8 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
SaleChannelMapper saleChannelMapper;
|
|
SaleChannelMapper saleChannelMapper;
|
|
|
@Resource
|
|
@Resource
|
|
|
WarehouseMapper warehouseMapper;
|
|
WarehouseMapper warehouseMapper;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ MoneyAccountMapper moneyAccountMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -71,6 +71,21 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
return ResponseResultUtil.success(companyMapper.selectById(id));
|
|
return ResponseResultUtil.success(companyMapper.selectById(id));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @desc : 可以绑定微信的员工人数 人数上限
|
|
|
|
|
+ * @author : admin
|
|
|
|
|
+ * @date : 2023/2/3 13:32
|
|
|
|
|
+ */
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public ResponseResultVO getCompanyMaxStaffNum(Integer id) {
|
|
|
|
|
+ Company company = companyMapper.selectById(id);
|
|
|
|
|
+ Map<String,Object> mp = new HashMap<>();
|
|
|
|
|
+ mp.put("maxStaffNum",company.getMaxStaffNum());
|
|
|
|
|
+ mp.put("curStaffNum",company.getCurStaffNum());
|
|
|
|
|
+ return ResponseResultUtil.success(mp);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* @desc : 通过ID查询
|
|
* @desc : 通过ID查询
|
|
|
* @author : admin
|
|
* @author : admin
|
|
@@ -98,6 +113,20 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * @desc : 更新微信用的公司
|
|
|
|
|
+ * @author : admin
|
|
|
|
|
+ * @date : 2023/2/3 13:32
|
|
|
|
|
+ */
|
|
|
|
|
+ @Override
|
|
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
|
|
+ public ResponseResultVO updateCompanyCurStaffNum(Map<String, Object> map) {
|
|
|
|
|
+ Integer curStaffNum = Integer.valueOf(map.get("curStaffNum") + "");
|
|
|
|
|
+ Integer cpId = Integer.valueOf(map.get("cpId") + "");
|
|
|
|
|
+ companyMapper.updateCompanyCurStaffNum(cpId, curStaffNum);
|
|
|
|
|
+ return ResponseResultUtil.success(true);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
* @desc : 选择公司更新微信用户的所在当前的公司
|
|
* @desc : 选择公司更新微信用户的所在当前的公司
|
|
|
* @author : admin
|
|
* @author : admin
|
|
|
* @date : 2023/2/3 13:32
|
|
* @date : 2023/2/3 13:32
|
|
@@ -218,8 +247,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
m.put("roleCode",roleResponses.get(i).getRoleCode());
|
|
m.put("roleCode",roleResponses.get(i).getRoleCode());
|
|
|
m.put("roleName",roleResponses.get(i).getRoleName());
|
|
m.put("roleName",roleResponses.get(i).getRoleName());
|
|
|
m.put("displayNo",roleResponses.get(i).getDisplayNo());
|
|
m.put("displayNo",roleResponses.get(i).getDisplayNo());
|
|
|
- m.put("cpId",cpId);
|
|
|
|
|
- m.put("opCreateUserId",staffId);
|
|
|
|
|
listRoles.add(m);
|
|
listRoles.add(m);
|
|
|
}
|
|
}
|
|
|
map.put("roles",listRoles);
|
|
map.put("roles",listRoles);
|
|
@@ -232,8 +259,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
m.put("whName",warehouseResponses.get(i).getWhName());
|
|
m.put("whName",warehouseResponses.get(i).getWhName());
|
|
|
m.put("displayNo",warehouseResponses.get(i).getDisplayNo());
|
|
m.put("displayNo",warehouseResponses.get(i).getDisplayNo());
|
|
|
m.put("flgDefault",warehouseResponses.get(i).getFlgDefault());
|
|
m.put("flgDefault",warehouseResponses.get(i).getFlgDefault());
|
|
|
- m.put("cpId",cpId);
|
|
|
|
|
- m.put("opCreateUserId",staffId);
|
|
|
|
|
listWarehouses.add(m);
|
|
listWarehouses.add(m);
|
|
|
}
|
|
}
|
|
|
map.put("warehouses",listWarehouses);
|
|
map.put("warehouses",listWarehouses);
|
|
@@ -246,8 +271,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
m.put("channelName",saleChannelResponses.get(i).getChannelName());
|
|
m.put("channelName",saleChannelResponses.get(i).getChannelName());
|
|
|
m.put("displayNo",saleChannelResponses.get(i).getDisplayNo());
|
|
m.put("displayNo",saleChannelResponses.get(i).getDisplayNo());
|
|
|
m.put("flgDefault",saleChannelResponses.get(i).getFlgDefault());
|
|
m.put("flgDefault",saleChannelResponses.get(i).getFlgDefault());
|
|
|
- m.put("cpId",cpId);
|
|
|
|
|
- m.put("opCreateUserId",staffId);
|
|
|
|
|
listSaleChannels.add(m);
|
|
listSaleChannels.add(m);
|
|
|
}
|
|
}
|
|
|
map.put("saleChannels",listSaleChannels);
|
|
map.put("saleChannels",listSaleChannels);
|
|
@@ -261,11 +284,23 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
m.put("dataValue",dictionaryDataResponses.get(i).getDataValue());
|
|
m.put("dataValue",dictionaryDataResponses.get(i).getDataValue());
|
|
|
m.put("displayNo",dictionaryDataResponses.get(i).getDisplayNo());
|
|
m.put("displayNo",dictionaryDataResponses.get(i).getDisplayNo());
|
|
|
m.put("flgDefault",dictionaryDataResponses.get(i).getFlgDefault());
|
|
m.put("flgDefault",dictionaryDataResponses.get(i).getFlgDefault());
|
|
|
- m.put("cpId",cpId);
|
|
|
|
|
- m.put("opCreateUserId",staffId);
|
|
|
|
|
listDictionaryDatas.add(m);
|
|
listDictionaryDatas.add(m);
|
|
|
}
|
|
}
|
|
|
map.put("dictionaryDatas",listDictionaryDatas);
|
|
map.put("dictionaryDatas",listDictionaryDatas);
|
|
|
|
|
+ // 资金账户
|
|
|
|
|
+ List<MoneyAccountResponse> moneyAccountResponses = moneyAccountMapper.selectByCond(new MoneyAccountQuery());
|
|
|
|
|
+ List<Map<String, Object>> listMoneyAccounts = new ArrayList<>();
|
|
|
|
|
+ for (int i = 0; i < moneyAccountResponses.size(); i++) {
|
|
|
|
|
+ m = new HashMap<>();
|
|
|
|
|
+ m.put("macCode",moneyAccountResponses.get(i).getMacCode());
|
|
|
|
|
+ m.put("macName",moneyAccountResponses.get(i).getMacName());
|
|
|
|
|
+ m.put("macType",moneyAccountResponses.get(i).getMacType());
|
|
|
|
|
+ m.put("balance",moneyAccountResponses.get(i).getBalance());
|
|
|
|
|
+ m.put("displayNo",moneyAccountResponses.get(i).getDisplayNo());
|
|
|
|
|
+ m.put("flgDefault",moneyAccountResponses.get(i).getFlgDefault());
|
|
|
|
|
+ listMoneyAccounts.add(m);
|
|
|
|
|
+ }
|
|
|
|
|
+ map.put("moneyAccounts",listMoneyAccounts);
|
|
|
// 计量单位
|
|
// 计量单位
|
|
|
List<UnitResponse> unitResponses = unitMapper.selectByCond(new UnitQuery());
|
|
List<UnitResponse> unitResponses = unitMapper.selectByCond(new UnitQuery());
|
|
|
List<Map<String, Object>> listUnits = new ArrayList<>();
|
|
List<Map<String, Object>> listUnits = new ArrayList<>();
|
|
@@ -275,8 +310,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
m.put("unitName",unitResponses.get(i).getUnitName());
|
|
m.put("unitName",unitResponses.get(i).getUnitName());
|
|
|
m.put("decimalPlaces",unitResponses.get(i).getDecimalPlaces());
|
|
m.put("decimalPlaces",unitResponses.get(i).getDecimalPlaces());
|
|
|
m.put("displayNo",unitResponses.get(i).getDisplayNo());
|
|
m.put("displayNo",unitResponses.get(i).getDisplayNo());
|
|
|
- m.put("cpId",cpId);
|
|
|
|
|
- m.put("opCreateUserId",staffId);
|
|
|
|
|
listUnits.add(m);
|
|
listUnits.add(m);
|
|
|
}
|
|
}
|
|
|
map.put("units",listUnits);
|
|
map.put("units",listUnits);
|
|
@@ -296,11 +329,27 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
m.put("levelCode",goodsCategoryResponses.get(i).getLevelCode());
|
|
m.put("levelCode",goodsCategoryResponses.get(i).getLevelCode());
|
|
|
m.put("levelName",goodsCategoryResponses.get(i).getLevelName());
|
|
m.put("levelName",goodsCategoryResponses.get(i).getLevelName());
|
|
|
m.put("displayNo",goodsCategoryResponses.get(i).getDisplayNo());
|
|
m.put("displayNo",goodsCategoryResponses.get(i).getDisplayNo());
|
|
|
- m.put("cpId",cpId);
|
|
|
|
|
- m.put("opCreateUserId",staffId);
|
|
|
|
|
listGoodsCategorys.add(m);
|
|
listGoodsCategorys.add(m);
|
|
|
}
|
|
}
|
|
|
map.put("goodsCategorys",listGoodsCategorys);
|
|
map.put("goodsCategorys",listGoodsCategorys);
|
|
|
|
|
+
|
|
|
|
|
+ // 打印票据
|
|
|
|
|
+ //List<PrintLayout> printLayoutResponses = printLayoutMapper.selectByCond(new PrintLayout());
|
|
|
|
|
+ //List<Map<String, Object>> listPrintLayout = new ArrayList<>();
|
|
|
|
|
+ //for (int i = 0; i < printLayoutResponses.size(); i++) {
|
|
|
|
|
+ // m = new HashMap<>();
|
|
|
|
|
+ // m.put("layoutName",printLayoutResponses.get(i).getLayoutName());
|
|
|
|
|
+ // m.put("layoutData",printLayoutResponses.get(i).getLayoutData());
|
|
|
|
|
+ // m.put("displayNo",printLayoutResponses.get(i).getDisplayNo());
|
|
|
|
|
+ // m.put("docName",printLayoutResponses.get(i).getDocName());
|
|
|
|
|
+ // m.put("cpId",cpId);
|
|
|
|
|
+ // m.put("opCreateUserId",staffId);
|
|
|
|
|
+ // listPrintLayout.add(m);
|
|
|
|
|
+ //}
|
|
|
|
|
+ //map.put("printLayout",listPrintLayout);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
ResponseResultVO listResponseResultVO = staffFeign.insertFeignCompanyData(map);
|
|
ResponseResultVO listResponseResultVO = staffFeign.insertFeignCompanyData(map);
|
|
|
|
|
|
|
|
// 如果没有成功返回
|
|
// 如果没有成功返回
|