Compare commits
No commits in common. "093d05b5cee925f89bd7ac3ebb0468ef3fc176bf" and "51735e32f9ec2ecb3ff2b208da3101ef55277f4d" have entirely different histories.
093d05b5ce
...
51735e32f9
|
|
@ -233,13 +233,10 @@ public class BizTodoItemService {
|
|||
if (applyMap != null) {
|
||||
map.put("areaId", applyMap.get("marketingAreaId"));
|
||||
todoUserIdsList = userService.listAll(map, ".selectTodoUserListByTaskId");
|
||||
if (CollectionUtils.isEmpty(todoUserIdsList)) {
|
||||
todoUserIdsList = userService.listAll(map, ".selectTodoUserListByTaskId1");
|
||||
}
|
||||
}
|
||||
}
|
||||
// 如果营销区域的上级是华南业务部,且审批流到了业务部长,该区域的部长离职后未找到合适人选,审核直接提交给营销总监
|
||||
/*if (("da_company").equals(codeMap.get("staffNo") + "")) {
|
||||
if (("da_company").equals(codeMap.get("staffNo") + "")) {
|
||||
Map<String, Object> tempMap = new HashMap<>();
|
||||
tempMap.put("areaId", areaId);
|
||||
Map areaMap = marketingAreaService.oneBySql(tempMap, ".oneBySql");
|
||||
|
|
@ -251,7 +248,7 @@ public class BizTodoItemService {
|
|||
userInfo.setUserId("ad5f919896fb4a5daefb3a3afa5f59e3");
|
||||
todoUserIdsList.add(userInfo);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(todoUserIdsList)) {
|
||||
for (int i = 0; i < todoUserIdsList.size(); i++) {
|
||||
UserInfo userInfo = (UserInfo) todoUserIdsList.get(i);
|
||||
|
|
|
|||
|
|
@ -71,9 +71,6 @@ public class ReceiptRecordsController extends BaseController {
|
|||
@ApiParam(required = false, value = "经销商出货开始时间") @RequestParam(required = false) String startDate,
|
||||
@ApiParam(required = false, value = "经销商出货结束时间") @RequestParam(required = false) String endDate,
|
||||
@ApiParam(required = false, value = "发货单客户id") @RequestParam(required = false) String invoiceClientId,
|
||||
@ApiParam(required = false, value = "商品编码") @RequestParam(required = false) String goodsNo,
|
||||
@ApiParam(required = false, value = "商品名称") @RequestParam(required = false) String goodsName,
|
||||
@ApiParam(required = false, value = "商品规格") @RequestParam(required = false) String specifications,
|
||||
@ApiParam(required = true, value = "页码", defaultValue = "1") @RequestParam(value = "page") Integer pageNum,
|
||||
@ApiParam(required = true, value = "每页条数", defaultValue = "10") @RequestParam(value = "pageSize") Integer pageSize,
|
||||
HttpServletRequest request) {
|
||||
|
|
@ -99,9 +96,6 @@ public class ReceiptRecordsController extends BaseController {
|
|||
params.put("startDate", startDate);
|
||||
params.put("endDate", endDate);
|
||||
params.put("invoiceClientId", invoiceClientId);
|
||||
params.put("goodsNo", goodsNo);
|
||||
params.put("goodsName", goodsName);
|
||||
params.put("specifications", specifications);
|
||||
params.put("page", pageNum);
|
||||
params.put("pageSize", pageSize);
|
||||
return toPage(receiptRecordsService.pageList(params, ".findRecordsByCondition"));
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ public class StockReportApi extends BaseController {
|
|||
@ApiParam(required = false, value = "规格") @RequestParam(required = false) String specifications,
|
||||
@ApiParam(required = false, value = "开始日期") @RequestParam(required = false) String startDate,
|
||||
@ApiParam(required = false, value = "结束日期") @RequestParam(required = false) String endDate,
|
||||
@ApiParam(required = false, value = "营销区域id") @RequestParam(required = false) String areaId,
|
||||
@ApiParam(required = true, value = "页码", defaultValue = "1") @RequestParam(value = "page") Integer pageNum,
|
||||
@ApiParam(required = true, value = "每页条数", defaultValue = "10") @RequestParam(value = "pageSize") Integer pageSize,
|
||||
HttpServletRequest request) {
|
||||
|
|
@ -61,7 +60,7 @@ public class StockReportApi extends BaseController {
|
|||
if (!redisService.exists(token)) {
|
||||
return AjaxResult.error(ErrorUtils.IS_NOT_LOGIN_ERROR, "用户未登录");
|
||||
}
|
||||
params = roleDateUtils.roleUtiles(token, areaId, "", "");
|
||||
params = roleDateUtils.roleUtiles(token, "", "", "");
|
||||
if ("0".equals(params.get("code"))) {
|
||||
return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ public class StockReportController extends BaseController {
|
|||
@ApiParam(required = false, value = "发起开始日期") @RequestParam(required = false) String startTime,
|
||||
@ApiParam(required = false, value = "发起开始日期") @RequestParam(required = false) String endTime,
|
||||
@ApiParam(required = false, value = "结束日期") @RequestParam(required = false) String endDate,
|
||||
@ApiParam(required = false, value = "营销区域id") @RequestParam(required = false) String areaId,
|
||||
@ApiParam(required = true, value = "页码", defaultValue = "1") @RequestParam(value = "page") Integer pageNum,
|
||||
@ApiParam(required = true, value = "每页条数", defaultValue = "10") @RequestParam(value = "pageSize") Integer pageSize,
|
||||
HttpServletRequest request) {
|
||||
|
|
@ -71,7 +70,7 @@ public class StockReportController extends BaseController {
|
|||
if (!redisService.isKey(token)) {
|
||||
return AjaxResult.error(ErrorUtils.IS_NOT_LOGIN_ERROR, "用户未登录");
|
||||
}
|
||||
params = roleDateUtils.roleUtiles(token, areaId, "", "");
|
||||
params = roleDateUtils.roleUtiles(token, "", "", "");
|
||||
if ("0".equals(params.get("code"))) {
|
||||
return AjaxResult.error(ErrorUtils.USERNAME_POWER_ERROR, "无权查看");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@
|
|||
)
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY b.create_time DESC, b.id
|
||||
ORDER BY b.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="countUserByRole" parameterType="map" resultType="Integer">
|
||||
|
|
|
|||
|
|
@ -419,7 +419,6 @@
|
|||
GROUP BY
|
||||
t1.sem_id ) mact
|
||||
LEFT JOIN crm_marketing_area_info b ON mact.sem_id = b.id
|
||||
WHERE b.status = '1'
|
||||
</select>
|
||||
|
||||
<!-- 市场活动报表-按照业务员分组统计 -->
|
||||
|
|
|
|||
|
|
@ -10,8 +10,10 @@ import com.yb.lb.common.config.UserConfig;
|
|||
import com.yb.lb.common.utils.*;
|
||||
import com.yb.lb.webapp.Invoice.entity.InvoiceDetail;
|
||||
import com.yb.lb.webapp.Invoice.entity.InvoiceInfo;
|
||||
import com.yb.lb.webapp.goodsinfo.goods.entity.GoodsInfo;
|
||||
import com.yb.lb.webapp.random.service.RandomService;
|
||||
import com.yb.lb.webapp.redis.service.RedisService;
|
||||
import com.yb.lb.webapp.u8.ueight.entity.CustomerInfo;
|
||||
import com.yb.lb.webapp.u8.ueight.service.OrderUeightService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -20,6 +22,7 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -46,6 +49,84 @@ public class CrmInvoiceService {
|
|||
@Autowired
|
||||
BaseSqlServer2Dao<InvoiceInfo> dao2;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @author lyb
|
||||
* @date 20210526
|
||||
*/
|
||||
public boolean addInfo(Map<String, String> params, String id, String json) {
|
||||
String companyId = params.get("companyId") + "";
|
||||
String invoiceNo = randomService.randomUtils2(FINALCMD.INVOICE_NO, DateUtil.getDays(), companyId);
|
||||
params.put("invoiceNo", invoiceNo);
|
||||
if (dao.counts(InvoiceInfo.class.getName() + ".findCode", params) > 0) {
|
||||
invoiceNo = randomService.randomUtils2(FINALCMD.INVOICE_NO, DateUtil.getDays(), companyId);
|
||||
params.put("invoiceNo", invoiceNo);
|
||||
}
|
||||
//添加主表
|
||||
if (dao.add_obj(InvoiceInfo.class.getName() + id, params)) {
|
||||
List lists = new ArrayList();
|
||||
List goodsList = new ArrayList();
|
||||
List<Map<String, Object>> list = ListOrMapForJson.getlistForJson(json);
|
||||
for (Map map : list) {
|
||||
map.put("invoiceId", params.get("id") + "");
|
||||
map.put("id", IdUtil.simpleUUID());
|
||||
map.put("createTime", DateUtil.getTime());
|
||||
lists.add(map);
|
||||
// 引用
|
||||
Map tMap = new HashMap();
|
||||
tMap.put("id", IdUtil.simpleUUID());
|
||||
tMap.put("archivesId", params.get("id") + "");
|
||||
tMap.put("quoteId", map.get("goodsId") + "");
|
||||
goodsList.add(tMap);
|
||||
}
|
||||
if (dao.add_obj(InvoiceDetail.class.getName() + ".addCrmInvoiceDetails", lists)) {
|
||||
// 添加对商品的引用
|
||||
dao.add_obj(GoodsInfo.class.getName() + ".addQuotes", goodsList);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 发货单修改
|
||||
*
|
||||
* @author lyb
|
||||
* @date 20210526
|
||||
*/
|
||||
public boolean updateInfo(Map<String, String> params, String id, String json) {
|
||||
if (dao.update(InvoiceInfo.class.getName() + id, params)) {
|
||||
Map<String, Object> info = new HashMap<>();
|
||||
String invoiceId = params.get("id") + "";
|
||||
info.put("invoiceId", invoiceId);
|
||||
dao.delete(InvoiceDetail.class.getName() + ".deleteCrmInvoiceDetailById", info);
|
||||
List lists = new ArrayList();
|
||||
List goodsList = new ArrayList();
|
||||
List<Map<String, Object>> list = ListOrMapForJson.getlistForJson(json);
|
||||
for (Map map : list) {
|
||||
map.put("invoiceId", invoiceId);
|
||||
map.put("id", IdUtil.simpleUUID());
|
||||
map.put("createTime", DateUtil.getTime());
|
||||
lists.add(map);
|
||||
// 引用
|
||||
Map tMap = new HashMap();
|
||||
tMap.put("id", IdUtil.simpleUUID());
|
||||
tMap.put("archivesId", invoiceId);
|
||||
tMap.put("quoteId", map.get("goodsId") + "");
|
||||
goodsList.add(tMap);
|
||||
}
|
||||
if (dao.add_obj(InvoiceDetail.class.getName() + ".addCrmInvoiceDetails", lists)) {
|
||||
// 删除商品的引用
|
||||
dao.delete(GoodsInfo.class.getName() + ".deleteQuoteById", invoiceId);
|
||||
// 添加对商品的引用
|
||||
dao.add_obj(GoodsInfo.class.getName() + ".addQuotes", goodsList);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用修改
|
||||
*
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ public class ApplyClientInfoService {
|
|||
// 建档人id
|
||||
applyContact.setCreateUserId(applyClientInfo.getCreateUserId());
|
||||
// 建档人名称
|
||||
applyContact.setCreateUser(params.get("realName") + "");
|
||||
applyContact.setCreateUser(params.get("id") + "");
|
||||
// 建档时间
|
||||
applyContact.setCreateTime(DateUtil.getTime());
|
||||
// 公司组织id
|
||||
|
|
|
|||
|
|
@ -427,7 +427,6 @@ public class DistributorInfo implements Serializable {
|
|||
/**
|
||||
* 0待认证1已认证
|
||||
*/
|
||||
@Excel(name = "认证状态", width = 15, orderNum = "15", replace = {"待认证_0", "已认证_1"})
|
||||
private String isVerify;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -97,8 +97,6 @@ public class OrderCronService {
|
|||
goodsMap1.put("createTime", createTime);
|
||||
}
|
||||
if (orderUeightService.addOrderDetail(goodsList1)) {
|
||||
// 因为U8的id是存到100和4002个数据库中的,可能会重复,因此视图中加了字符便于区分,所以这里需要获取U8的原始id回写U8
|
||||
info.put("id", getBeforeDash(orderId));
|
||||
// 回写U8销售出库单的状态
|
||||
if (FINALCMD.KESAI.equals(companyId)) {
|
||||
orderUeightService.update(".updateOrderInfo", info);
|
||||
|
|
@ -139,11 +137,4 @@ public class OrderCronService {
|
|||
}
|
||||
}
|
||||
|
||||
public String getBeforeDash(String input) {
|
||||
if (input == null || !input.contains("-")) {
|
||||
return input;
|
||||
}
|
||||
return input.split("-")[0];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue