|
@@ -123,6 +123,24 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
@Override
|
|
|
public HttpRespMsg setPackageList(Company company) {
|
|
|
companyMapper.updateById(company);
|
|
|
+ if(company.getPackageProjectApproval()==1){
|
|
|
+ //开启工时管家立项管理模块 复制模板到客户企业微信
|
|
|
+ String url="https://worktime.ttkuaiban.com/api/wxcorp/copyTemplateToCorp";
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ RestTemplate restTemplate = new RestTemplate();
|
|
|
+ MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
|
|
|
+ headers.setContentType(type);
|
|
|
+ headers.add("Accept", MediaType.APPLICATION_JSON.toString());
|
|
|
+ JSONObject requestMap = new JSONObject();
|
|
|
+ requestMap.put("companyId",company.getId());
|
|
|
+ HttpEntity<JSONObject> entity = new HttpEntity<>(requestMap, headers);
|
|
|
+ ResponseEntity<String> ResponseEntity = restTemplate.postForEntity(url, entity, String.class);
|
|
|
+ if (ResponseEntity.getStatusCode() == HttpStatus.OK) {
|
|
|
+ String resp = ResponseEntity.getBody();
|
|
|
+ JSONObject respJson = JSONObject.parseObject(resp);
|
|
|
+ System.out.println(resp);
|
|
|
+ }
|
|
|
+ }
|
|
|
String str = "变更了使用版本:";
|
|
|
if (company.getPackageWorktime()==1) {
|
|
|
str += "工时+";
|
|
@@ -137,6 +155,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
|
|
|
if (company.getPackageFinance() == 1) str += "财务核算+";
|
|
|
if (company.getPackageSimple()== 1) str += "Excel简易版+";
|
|
|
if (company.getPackageProvider()== 1) str += "供应商+";
|
|
|
+ if (company.getPackageProjectApproval()== 1) str += "立项管理+";
|
|
|
saveLog(str);
|
|
|
return new HttpRespMsg();
|
|
|
}
|